Namespaces

Types

Type Vector

Namespace MathNet.Numerics.LinearAlgebra

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

Methods

Properties

Public instance methods

Vector Add(IVector<T> b)

Parameters
return Vector
IVector<T> b

Vector Add(double b)

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

void AddInplace(double b)

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

void AddInplace(IVector<T> b)

Parameters
IVector<T> b

Vector ArrayDivide(IVector<T> b)

Parameters
return Vector
IVector<T> b

void ArrayDivideInplace(IVector<T> b)

Parameters
IVector<T> b

Vector ArrayMultiply(IVector<T> b)

Parameters
return Vector
IVector<T> b

void ArrayMultiplyInplace(IVector<T> b)

Parameters
IVector<T> b

Vector Clone()

Returns a deep copy of this instance.
Parameters
return Vector

Double[] CopyToArray()

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

Vector CrossMultiply(IVector<T> b)

Parameters
return Vector
IVector<T> b

bool Equals(object obj)

Parameters
return bool
object obj

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

Vector Negate()

Negate this vector.
This method has the same effect as the overloaded - operator.
Parameters
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.
Parameters
return double

double Norm1()

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

Vector Normalize()

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

double NormInf()

Infinity-Norm.
Parameters
return double

double NormP(int p)

p-Norm.
Parameters
return double
int p

double ScalarMultiply(IVector<T> b)

Parameters
return double
IVector<T> b

Vector Scale(double scalar)

Scale this vector with a scalar.
This method has the same effect as the overloaded * operator.
Parameters
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.
Parameters
double scalar

double SquaredNorm()

Squared Euclidean 2-Norm.
Parameters
return double

Vector Subtract(IVector<T> b)

Parameters
return Vector
IVector<T> 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.
Parameters
return Vector
double b The real scalar.

void SubtractInplace(IVector<T> b)

Parameters
IVector<T> b

void SubtractInplace(double b)

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

Matrix TensorMultiply(IVector<T> b)

Parameters
return Matrix
IVector<T> b

Matrix ToColumnMatrix()

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

Matrix ToRowMatrix()

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

string ToString()

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

Public static methods

bool AlmostEqual(Vector u, Vector v)

Returns true if two vectors are almost equal.
Parameters
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).
Parameters
return bool
Vector u
Vector v
double relativeAccuracy

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

Parameters
return Vector
IVector<T> a
IVector<T> b

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

Parameters
return Vector
IVector<T> a
IVector<T> b

Vector BasisVector(int n, int i)

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

Vector Create(Double[] components)

Parameters
return Vector
Double[] components

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

Parameters
return Vector
IVector<T> u
IVector<T> v

Matrix DyadicProduct(IVector<T> u, IVector<T> v)

Parameters
return Matrix
IVector<T> u
IVector<T> v

Vector Ones(int n)

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

Vector Random(int n)

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

Vector Random(int n, IContinuousGenerator randomDistribution)

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

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

Parameters
return double
IVector<T> u
IVector<T> v

Vector Zeros(int n)

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

Public properties

double Item get; set;

Gets or sets the element indexed by iin the Vector.
return double

int Length get;

Gets dimensionality of the vector.
return int