﻿VectorAlgebra Class
 VectorAlgebra Class Encog 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 https://github.com/goffer-looney
Inheritance Hierarchy

System Object
Encog.MathUtil VectorAlgebra

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

`public class VectorAlgebra`

The VectorAlgebra type exposes the following members.

Constructors

NameDescription
VectorAlgebra
Initializes a new instance of the VectorAlgebra class
Top
Methods

NameDescription
v1 = v1 + v2
ClampComponents
For each components, reset their value to maxValue if their absolute value exceeds it.
Copy
dst = src Copy a vector.
Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType
Gets the type of the current instance.
(Inherited from Object.)
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Mul
v = k * v The components of the vector are multiplied by k.
MulRand
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()
Neg
v = -v
Randomise( Double )
v = U(0, 0.1)
Randomise( Double , Double)
v = U(-1, 1) * maxValue Randomise each component of a vector to [-maxValue, maxValue]. thread-safety depends on Random.nextDouble().
Sub
v1 = v1 - v2
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Top