Types

Type Vector

Namespace MathNet.Numerics.LinearAlgebra

Interfaces IVector<T>, IList<double>, ICloneable

Public instance methods

 return `Vector` `IVector` b

Add a real scalar to all elements of this vector.
This method has the same effect as the overloaded + operator.
 return `Vector` `double` b The real scalar.

In place addition of real scalar to all elements of this vector.
This method changes this vector.
 `double` b

 `IVector` b

Vector ArrayDivide(IVector<T> b)

 return `Vector` `IVector` b

void ArrayDivideInplace(IVector<T> b)

 `IVector` b

Vector ArrayMultiply(IVector<T> b)

 return `Vector` `IVector` b

void ArrayMultiplyInplace(IVector<T> b)

 `IVector` b

Vector Clone()

Returns a deep copy of this instance.
 return `Vector`

Double[] CopyToArray()

Copies the internal data structure to an array.
 return `Double[]`

Vector CrossMultiply(IVector<T> b)

 return `Vector` `IVector` b

bool Equals(object obj)

 return `bool` `object` obj

int GetHashCode()

 return `int`

Type GetType()

 return `Type`

Vector Negate()

Negate this vector.
This method has the same effect as the overloaded - operator.
 return `Vector`

void NegateInplace()

In place unary minus of this vector.
This method changes this vector.

double Norm()

Euclidean Norm also known as 2-Norm.
 return `double`

double Norm1()

1-Norm also known as Manhattan Norm or Taxicab Norm.
 return `double`

Vector Normalize()

Normalizes this vector to a unit vector with respect to the Eucliden 2-Norm.
 return `Vector`

double NormInf()

Infinity-Norm.
 return `double`

double NormP(int p)

p-Norm.
 return `double` `int` p

double ScalarMultiply(IVector<T> b)

 return `double` `IVector` b

Vector Scale(double scalar)

Scale this vector with a scalar.
This method has the same effect as the overloaded * operator.
 return `Vector` `double` scalar The scalar to scale with

void ScaleInplace(double scalar)

Multiplies in place this `Vector` by a scalar.
This method changes this vector.
 `double` scalar

double SquaredNorm()

Squared Euclidean 2-Norm.
 return `double`

Vector Subtract(IVector<T> b)

 return `Vector` `IVector` b

Vector Subtract(double b)

Subtract a real scalar from all elements of this vector.
This method has the same effect as the overloaded - operator.
 return `Vector` `double` b The real scalar.

void SubtractInplace(IVector<T> b)

 `IVector` b

void SubtractInplace(double b)

In place subtraction of a real scalar from all elements of this vector.
This method changes this vector.
 `double` b

Matrix TensorMultiply(IVector<T> b)

 return `Matrix` `IVector` b

Matrix ToColumnMatrix()

Create a matrix based on this vector in column form (one single column).
 return `Matrix`

Matrix ToRowMatrix()

Create a matrix based on this vector in row form (one single row).
 return `Matrix`

string ToString()

Formats this vector to a human-readable string
 return `string`

Public static methods

bool AlmostEqual(Vector u, Vector v)

Returns true if two vectors are almost equal.
 return `bool` `Vector` u `Vector` v

bool AlmostEqual(Vector u, Vector v, double relativeAccuracy)

Returns true if two vectors are almost equal (with some given relative accuracy).
 return `bool` `Vector` u `Vector` v `double` relativeAccuracy

Vector ArrayProduct(IVector<T> a, IVector<T> b)

 return `Vector` `IVector` a `IVector` b

Vector ArrayQuotient(IVector<T> a, IVector<T> b)

 return `Vector` `IVector` a `IVector` b

Vector BasisVector(int n, int i)

Generates an n-dimensional unit vector for i'th coordinate.
 return `Vector` `int` n Dimensionality of vector. `int` i Coordinate index.

Vector Create(Double[] components)

 return `Vector` `Double[]` components

Vector CrossProduct(IVector<T> u, IVector<T> v)

 return `Vector` `IVector` u `IVector` v

 return `Matrix` `IVector` u `IVector` v

Vector Ones(int n)

Generates an n-dimensional vector filled with 1.
 return `Vector` `int` n Dimensionality of vector.

Vector Random(int n)

Generates vector with random elements
 return `Vector` `int` n Dimensionality of vector.

Vector Random(int n, IContinuousGenerator randomDistribution)

Generates vector with random elements
 return `Vector` `int` n Dimensionality of vector. `IContinuousGenerator` randomDistribution Continuous Random Distribution or Source

double ScalarProduct(IVector<T> u, IVector<T> v)

 return `double` `IVector` u `IVector` v

Vector Zeros(int n)

Generates an n-dimensional vector filled with 0.
 return `Vector` `int` n Dimensionality of vector.

Public properties

double Item get; set;

Gets or sets the element indexed by `i`in the `Vector`.
 `return double`

int Length get;

Gets dimensionality of the vector.
 `return int`