VectorAlgebra ClassEncog Machine Learning Framework for .Net
Basic vector algebra operators. Vectors are represented as arrays of doubles. This class was created to support the calculations in the PSO algorithm. This class is thread safe. Contributed by: Geoffroy Noel
Inheritance Hierarchy

System Object
  Encog.MathUtil VectorAlgebra

Namespace: Encog.MathUtil
Assembly: encog-core-cs (in encog-core-cs.dll) Version: (

public class VectorAlgebra

The VectorAlgebra type exposes the following members.


Public methodVectorAlgebra
Initializes a new instance of the VectorAlgebra class

Public methodAdd
v1 = v1 + v2
Public methodClampComponents
For each components, reset their value to maxValue if their absolute value exceeds it.
Public methodCopy
dst = src Copy a vector.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMul
v = k * v The components of the vector are multiplied by k.
Public methodMulRand
v = k * U(0,1) * v The components of the vector are multiplied by k and a random number. A new random number is generated for each component. Thread-safety depends on Random.nextDouble()
Public methodNeg
v = -v
Public methodRandomise( Double )
v = U(0, 0.1)
Public methodRandomise( Double , Double)
v = U(-1, 1) * maxValue Randomise each component of a vector to [-maxValue, maxValue]. thread-safety depends on Random.nextDouble().
Public methodSub
v1 = v1 - v2
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also