C# 클래스 GSF.NumericalAnalysis.Euclidean

Contains an implementation of greatest common denominator and least common multiple using the Euclidean algorithm.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
GreatestCommonDenominator ( ) : int

Gets the greatest common denominator of all the integers in the source collection.

GreatestCommonDenominator ( int a, int b ) : int

Gets the greatest common denominator of the given integers.

GreatestCommonDenominator ( this source ) : int

Gets the greatest common denominator of all the integers in the source collection.

GreatestCommonDenominator ( ) : long

Gets the greatest common denominator of all the integers in the source collection.

GreatestCommonDenominator ( long a, long b ) : long

Gets the greatest common denominator of the given integers.

GreatestCommonDenominator ( this source ) : long

Gets the greatest common denominator of all the integers in the source collection.

LeastCommonMultiple ( ) : int

Gets the least common multiple of all the integers in the source collection.

LeastCommonMultiple ( int a, int b ) : int

Gets the least common multiple of the given integers.

LeastCommonMultiple ( this source ) : int

Gets the least common multiple of all the integers in the source collection.

LeastCommonMultiple ( ) : long

Gets the least common multiple of all the integers in the source collection.

LeastCommonMultiple ( long a, long b ) : long

Gets the least common multiple of the given integers.

LeastCommonMultiple ( this source ) : long

Gets the least common multiple of all the integers in the source collection.

Mod ( double numerator, double denominator ) : double

Implementation of the modulo operator using Euclidean division.

Wrap ( double value, double minimum, double range ) : double

Wraps a value to a range of values defined by the given minimum value and range.

This method wraps the given value based on the assumption that for every pair of values x and y where x-y=range, the values are equivalent. This is probably most widely understood in terms of angles, where 0, 360, 720, etc. are all equivalent angles. If you wanted to wrap an angle such that it is between 120 and 480, for instance, you could call Euclidean.Wrap(angle, 120, 360).

메소드 상세

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of all the integers in the source collection.
public static GreatestCommonDenominator ( ) : int
리턴 int

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of the given integers.
public static GreatestCommonDenominator ( int a, int b ) : int
a int The first of the given integers.
b int The second of the given integers.
리턴 int

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of all the integers in the source collection.
public static GreatestCommonDenominator ( this source ) : int
source this The collection of integers.
리턴 int

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of all the integers in the source collection.
public static GreatestCommonDenominator ( ) : long
리턴 long

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of the given integers.
public static GreatestCommonDenominator ( long a, long b ) : long
a long The first of the given integers.
b long The second of the given integers.
리턴 long

GreatestCommonDenominator() 공개 정적인 메소드

Gets the greatest common denominator of all the integers in the source collection.
public static GreatestCommonDenominator ( this source ) : long
source this The collection of integers.
리턴 long

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of all the integers in the source collection.
public static LeastCommonMultiple ( ) : int
리턴 int

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of the given integers.
public static LeastCommonMultiple ( int a, int b ) : int
a int The first of the given integers.
b int The second of the given integers.
리턴 int

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of all the integers in the source collection.
public static LeastCommonMultiple ( this source ) : int
source this The collection of integers.
리턴 int

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of all the integers in the source collection.
public static LeastCommonMultiple ( ) : long
리턴 long

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of the given integers.
public static LeastCommonMultiple ( long a, long b ) : long
a long The first of the given integers.
b long The second of the given integers.
리턴 long

LeastCommonMultiple() 공개 정적인 메소드

Gets the least common multiple of all the integers in the source collection.
public static LeastCommonMultiple ( this source ) : long
source this The collection of integers.
리턴 long

Mod() 공개 정적인 메소드

Implementation of the modulo operator using Euclidean division.
public static Mod ( double numerator, double denominator ) : double
numerator double The number to be divided.
denominator double The number to divide by.
리턴 double

Wrap() 공개 정적인 메소드

Wraps a value to a range of values defined by the given minimum value and range.
This method wraps the given value based on the assumption that for every pair of values x and y where x-y=range, the values are equivalent. This is probably most widely understood in terms of angles, where 0, 360, 720, etc. are all equivalent angles. If you wanted to wrap an angle such that it is between 120 and 480, for instance, you could call Euclidean.Wrap(angle, 120, 360).
public static Wrap ( double value, double minimum, double range ) : double
value double The value to be wrapped.
minimum double The minimum value of the range.
range double The size of the range.
리턴 double