Click or drag to resize
Accord.NET (logo)

Modular Structure

Modular distance (shortest distance between two marks on a circle).

Namespace:  Accord.Math.Distances
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public struct Modular : IDistance<double>, 
	IDistance<double, double>, IDistance<int>, 
	IDistance<int, int>
Request Example View Source

The Modular type exposes the following members.

Constructors
  NameDescription
Public methodModular
Initializes a new instance of the Modular class.
Top
Properties
  NameDescription
Public propertyModulo
Gets the maximum value that the distance can have before it wraps around in the circle.
Top
Methods
  NameDescription
Public methodDistance(Double, Double)
Computes the distance d(x,y) between points x and y.
Public methodDistance(Int32, Int32)
Computes the distance d(x,y) between points x and y.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The modular distance is the distance of two member in a circular space, or a ring. Roughly, it can be understood as the minimum difference between two numbers in this circular space, either going “clockwise” or “counter-clockwise”. For example, in a circle, the modular distance between 1° and 359° is 2° (and not 358°).

References:

See Also