C# Class Encog.MathUtil.Matrices.BiPolarUtil

This class contains a number of utility methods used to work with bipolar numbers. A bipolar number is another way to represent binary numbers. The value of true is defined to be one, where as false is defined to be negative one.
Show file Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
Bipolar2double ( bool b ) : double

Convert binary to bipolar, true is 1 and false is -1.

Bipolar2double ( bool b ) : double[]

Convert a boolean array to bipolar, true is 1 and false is -1.

Bipolar2double ( bool b ) : double[][]

Convert a 2D boolean array to bipolar, true is 1 and false is -1.

Double2bipolar ( double d ) : bool

Convert biploar to boolean, true is 1 and false is -1.

Double2bipolar ( double d ) : bool[]

Convert a bipolar array to a boolean array, true is 1 and false is -1.

Double2bipolar ( double d ) : bool[][]

Convert a 2D bipolar array to a boolean array, true is 1 and false is -1.

NormalizeBinary ( double d ) : double

Normalize a binary number. Greater than 0 becomes 1, zero and below are false.

ToBiPolar ( double d ) : double

Convert a number to bipolar.

ToBinary ( double d ) : double

Convert a single number from bipolar to binary.

ToNormalizedBinary ( double d ) : double

Normalize a number and convert to binary.

Method Details

Bipolar2double() public static method

Convert binary to bipolar, true is 1 and false is -1.
public static Bipolar2double ( bool b ) : double
b bool The binary value.
return double

Bipolar2double() public static method

Convert a boolean array to bipolar, true is 1 and false is -1.
public static Bipolar2double ( bool b ) : double[]
b bool The binary array to convert.
return double[]

Bipolar2double() public static method

Convert a 2D boolean array to bipolar, true is 1 and false is -1.
public static Bipolar2double ( bool b ) : double[][]
b bool The 2D array to convert.
return double[][]

Double2bipolar() public static method

Convert biploar to boolean, true is 1 and false is -1.
public static Double2bipolar ( double d ) : bool
d double A bipolar value.
return bool

Double2bipolar() public static method

Convert a bipolar array to a boolean array, true is 1 and false is -1.
public static Double2bipolar ( double d ) : bool[]
d double A bipolar array.
return bool[]

Double2bipolar() public static method

Convert a 2D bipolar array to a boolean array, true is 1 and false is -1.
public static Double2bipolar ( double d ) : bool[][]
d double A 2D bipolar array.
return bool[][]

NormalizeBinary() public static method

Normalize a binary number. Greater than 0 becomes 1, zero and below are false.
public static NormalizeBinary ( double d ) : double
d double A binary number in a double.
return double

ToBiPolar() public static method

Convert a number to bipolar.
public static ToBiPolar ( double d ) : double
d double A binary number.
return double

ToBinary() public static method

Convert a single number from bipolar to binary.
public static ToBinary ( double d ) : double
d double a bipolar number.
return double

ToNormalizedBinary() public static method

Normalize a number and convert to binary.
public static ToNormalizedBinary ( double d ) : double
d double A bipolar number.
return double