Table of Contents

Class Vector

Namespace
NominalSystems.Maths
Assembly
NominalSystems.Maths.dll

[NominalSystems] A semi-major vector

public sealed class Vector : IEnumerable<double>, IEnumerable
Inheritance
Vector
Implements

Constructors

Vector()

Default constructor

public Vector()

Vector(IVector)

Default constructor

public Vector(IVector a)

Parameters

a IVector

a vector

Vector(Matrix)

Default constructor

public Vector(Matrix a)

Parameters

a Matrix

a matrix

Vector(IEnumerable<double>)

Default constructor

public Vector(IEnumerable<double> a)

Parameters

a IEnumerable<double>

a vector enumerable

Vector(params double[])

Default constructor

public Vector(params double[] a)

Parameters

a double[]

a array

Vector(int)

Default constructor

public Vector(int s)

Parameters

s int

the size

Vector(uint)

Default constructor

public Vector(uint s)

Parameters

s uint

the size

Fields

Values

The 'Vector' values

public readonly double[] Values

Field Value

double[]

Properties

Absolute

public Vector Absolute { get; }

Property Value

Vector

this[int]

Get/Set 'Vector' data

public double this[int i] { get; set; }

Parameters

i int

index

Property Value

double

this[uint]

Get/Set 'Vector' data

public double this[uint i] { get; set; }

Parameters

i uint

index

Property Value

double

Methods

Dot(Vector, Vector)

Calculate dot product of 'Vector'

public static double Dot(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

double

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(object, double)

Determine whether the specified object is equal to the current vector, with some specified precision

public bool Equals(object obj, double precision)

Parameters

obj object

The object to compare with the current object

precision double

The precision within which values are considered equal

Returns

bool

true if the specified object is equal to the current object; otherwise, false

GetEnumerator()

public IEnumerator<double> GetEnumerator()

Returns

IEnumerator<double>

GetHashCode()

public override int GetHashCode()

Returns

int

IsNaN(Vector)

Is 'Vector' not a number

public static bool IsNaN(Vector a)

Parameters

a Vector

Returns

bool

IsZero(Vector)

Is 'Vector' all zeros

public static bool IsZero(Vector a)

Parameters

a Vector

Returns

bool

Map(Vector, Func<double, double, double>)

Map two 'Vector' values to new values

public void Map(Vector a, Func<double, double, double> mapper)

Parameters

a Vector

a 'Vector' to map

mapper Func<double, double, double>

the map function

Map(Func<double, double>)

Map all 'Vector' values to new values

public void Map(Func<double, double> mapper)

Parameters

mapper Func<double, double>

the map function

Map(Func<double, int, double>)

Map all 'Vector' values to new values

public void Map(Func<double, int, double> mapper)

Parameters

mapper Func<double, int, double>

the map function

ToString()

public override string ToString()

Returns

string

ToString(string)

public string ToString(string format)

Parameters

format string

Returns

string

Operators

operator +(Vector, Vector)

Returns the addition of a 'Vector' with a 'Vector'

public static Vector operator +(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

Vector

operator +(Vector, double)

Returns the addition of a 'Vector' with a 'double'

public static Vector operator +(Vector a, double b)

Parameters

a Vector
b double

Returns

Vector

operator +(double, Vector)

Returns the addition of a 'double' with a 'Vector'

public static Vector operator +(double a, Vector b)

Parameters

a double
b Vector

Returns

Vector

operator /(Vector, Vector)

Returns the division of a 'Vector' with a 'Vector'

public static Vector operator /(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

Vector

operator /(Vector, double)

Returns the division of a 'Vector' with a 'double'

public static Vector operator /(Vector a, double b)

Parameters

a Vector
b double

Returns

Vector

operator /(double, Vector)

Returns the division of a 'double' with a 'Vector'

public static Vector operator /(double a, Vector b)

Parameters

a double
b Vector

Returns

Vector

operator ==(Vector, Vector)

Returns true if 'Vector' is equal to 'Vector'

public static bool operator ==(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator ==(Vector, double)

Returns true if 'Vector' is equal to 'double'

public static bool operator ==(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator ==(double, Vector)

Returns true if 'double' is equal to 'Vector'

public static bool operator ==(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator >(Vector, Vector)

Returns true if 'Vector' is greater than 'Vector'

public static bool operator >(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator >(Vector, double)

Returns true if 'Vector' is greater than 'double'

public static bool operator >(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator >(double, Vector)

Returns true if 'double' is greater than 'Vector'

public static bool operator >(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator >=(Vector, Vector)

Returns true if 'Vector' is greater than or equal to 'Vector'

public static bool operator >=(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator >=(Vector, double)

Returns true if 'Vector' is greater than or equal to 'double'

public static bool operator >=(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator >=(double, Vector)

Returns true if 'double' is greater than or equal to 'Vector'

public static bool operator >=(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator !=(Vector, Vector)

Returns true if 'Vector' is not equal to 'Vector'

public static bool operator !=(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator !=(Vector, double)

Returns true if 'Vector' is not equal to 'double'

public static bool operator !=(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator !=(double, Vector)

Returns true if 'double' is not equal to 'Vector'

public static bool operator !=(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator <(Vector, Vector)

Returns true if 'Vector' is less than 'Vector'

public static bool operator <(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator <(Vector, double)

Returns true if 'Vector' is less than 'double'

public static bool operator <(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator <(double, Vector)

Returns true if 'double' is less than 'Vector'

public static bool operator <(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator <=(Vector, Vector)

Returns true if 'Vector' is less than or equal to 'Vector'

public static bool operator <=(Vector a, Vector b)

Parameters

a Vector

The 1st 'Vector'

b Vector

The 2nd 'Vector'

Returns

bool

operator <=(Vector, double)

Returns true if 'Vector' is less than or equal to 'double'

public static bool operator <=(Vector a, double b)

Parameters

a Vector

The 1st 'Vector'

b double

The 2nd 'double'

Returns

bool

operator <=(double, Vector)

Returns true if 'double' is less than or equal to 'Vector'

public static bool operator <=(double a, Vector b)

Parameters

a double

The 1st 'double'

b Vector

The 2nd 'Vector'

Returns

bool

operator *(Vector, Vector)

Returns the multiplication of a 'Vector' with a 'Vector'

public static Vector operator *(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

Vector

operator *(Vector, double)

Returns the multiplication of a 'Vector' with a 'double'

public static Vector operator *(Vector a, double b)

Parameters

a Vector
b double

Returns

Vector

operator *(double, Vector)

Returns the multiplication of a 'double' with a 'Vector'

public static Vector operator *(double a, Vector b)

Parameters

a double
b Vector

Returns

Vector

operator -(Vector, Vector)

Returns the subtraction of a 'Vector' with a 'Vector'

public static Vector operator -(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

Vector

operator -(Vector, double)

Returns the subtraction of a 'Vector' with a 'double'

public static Vector operator -(Vector a, double b)

Parameters

a Vector
b double

Returns

Vector

operator -(double, Vector)

Returns the subtraction of a 'double' with a 'Vector'

public static Vector operator -(double a, Vector b)

Parameters

a double
b Vector

Returns

Vector

operator -(Vector)

Returns the negation of a 'Vector'

public static Vector operator -(Vector a)

Parameters

a Vector

Returns

Vector