C# Класс Algorithmix.Utility

Показать файл Открыть проект

Открытые методы

Метод Описание
Absolute ( double input ) : double[]

Converts an array of positive and negative values to just their absolute values

Convolute ( double xx, double hh, int indicies ) : double[]

Performs 1D convolution an a given input array xx, with a convolution kernel hh

Distance ( Bgr color1, Bgr color2 ) : double

Determines the cartesian distance between two colors

Distance ( Color pixelA, Color pixelB ) : double

Returns the Cartesian Distance between from the first the second parameter

GetKernelIndicies ( double kernel, int startingKernelIndex ) : int[]

Generates the time indicies of kernel given the starting position

IntToBgr ( int color ) : Bgr

Takes an integer, returns a BGR color

IsBound ( Bitmap image, int xx, int yy ) : bool

Determines whether the given x and y coordinates are bound with in the given the given image

IsEqual ( Bgr color1, Bgr color2 ) : bool

Checks if two colors are equal

Max ( double array ) : int>.Tuple
Reverse ( double original ) : double[]
Reverse ( int original ) : int[]
SlopeFromPoints ( Point p1, Point p2 ) : double
Threshold ( double input, double threshold ) : double[]

Thresholds the input array by a factor of the maximum value. The Maximum value is defined as the maximum EXCLUDING the first and the Last - because the first and the last are implicit features All values that are less than factor*max(input) are set to zero, others are set to max

Описание методов

Absolute() публичный статический Метод

Converts an array of positive and negative values to just their absolute values
public static Absolute ( double input ) : double[]
input double values
Результат double[]

Convolute() публичный статический Метод

Performs 1D convolution an a given input array xx, with a convolution kernel hh
public static Convolute ( double xx, double hh, int indicies ) : double[]
xx double series input
hh double convolution kernel
indicies int time index of the kernel
Результат double[]

Distance() публичный статический Метод

Determines the cartesian distance between two colors
public static Distance ( Bgr color1, Bgr color2 ) : double
color1 Bgr First Color
color2 Bgr Second Color
Результат double

Distance() публичный статический Метод

Returns the Cartesian Distance between from the first the second parameter
public static Distance ( Color pixelA, Color pixelB ) : double
pixelA Color Pixel of given color from
pixelB Color Pixel of given color to
Результат double

GetKernelIndicies() публичный статический Метод

Generates the time indicies of kernel given the starting position
public static GetKernelIndicies ( double kernel, int startingKernelIndex ) : int[]
kernel double The convolution kernel
startingKernelIndex int the starting time of the kernel (-1 etc.)
Результат int[]

IntToBgr() публичный статический Метод

Takes an integer, returns a BGR color
public static IntToBgr ( int color ) : Bgr
color int an integer between 0 and 0xFFFFFF inclusive
Результат Bgr

IsBound() публичный статический Метод

Determines whether the given x and y coordinates are bound with in the given the given image
public static IsBound ( Bitmap image, int xx, int yy ) : bool
image System.Drawing.Bitmap Bit map image to checked
xx int X position of the pixel or Column
yy int Y position of the pixel or Row
Результат bool

IsEqual() публичный статический Метод

Checks if two colors are equal
public static IsEqual ( Bgr color1, Bgr color2 ) : bool
color1 Bgr first color
color2 Bgr second color
Результат bool

Max() публичный статический Метод

public static Max ( double array ) : int>.Tuple
array double
Результат int>.Tuple

Reverse() публичный статический Метод

public static Reverse ( double original ) : double[]
original double
Результат double[]

Reverse() публичный статический Метод

public static Reverse ( int original ) : int[]
original int
Результат int[]

SlopeFromPoints() публичный статический Метод

public static SlopeFromPoints ( Point p1, Point p2 ) : double
p1 Point
p2 Point
Результат double

Threshold() публичный статический Метод

Thresholds the input array by a factor of the maximum value. The Maximum value is defined as the maximum EXCLUDING the first and the Last - because the first and the last are implicit features All values that are less than factor*max(input) are set to zero, others are set to max
public static Threshold ( double input, double threshold ) : double[]
input double Array to be thresholded
threshold double Multiplier value, if this value is 0.5, then we threshold by half the max
Результат double[]