C# Class Algorithmix.Utility

Afficher le fichier Open project: Algorithmix/Papyrus

Méthodes publiques

Méthode Description
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

Method Details

Absolute() public static méthode

Converts an array of positive and negative values to just their absolute values
public static Absolute ( double input ) : double[]
input double values
Résultat double[]

Convolute() public static méthode

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
Résultat double[]

Distance() public static méthode

Determines the cartesian distance between two colors
public static Distance ( Bgr color1, Bgr color2 ) : double
color1 Bgr First Color
color2 Bgr Second Color
Résultat double

Distance() public static méthode

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
Résultat double

GetKernelIndicies() public static méthode

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.)
Résultat int[]

IntToBgr() public static méthode

Takes an integer, returns a BGR color
public static IntToBgr ( int color ) : Bgr
color int an integer between 0 and 0xFFFFFF inclusive
Résultat Bgr

IsBound() public static méthode

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
Résultat bool

IsEqual() public static méthode

Checks if two colors are equal
public static IsEqual ( Bgr color1, Bgr color2 ) : bool
color1 Bgr first color
color2 Bgr second color
Résultat bool

Max() public static méthode

public static Max ( double array ) : int>.Tuple
array double
Résultat int>.Tuple

Reverse() public static méthode

public static Reverse ( double original ) : double[]
original double
Résultat double[]

Reverse() public static méthode

public static Reverse ( int original ) : int[]
original int
Résultat int[]

SlopeFromPoints() public static méthode

public static SlopeFromPoints ( Point p1, Point p2 ) : double
p1 Point
p2 Point
Résultat double

Threshold() public static méthode

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
Résultat double[]