Vector

D-Dimensional Vector with Coordinate/Element (Component) Type E.

struct Vector (
E
uint D
bool normalizedFlag = false
Orient orient = Orient.column
) if (
D >= 1 &&
(
!normalizedFlag ||
isFloatingPoint!E
)
) {
enum dimension;
static immutable
auto E0;
static immutable
auto E1;
static immutable
Vector e1;
static immutable
Vector e2;
static immutable
Vector e1;
static immutable
Vector e2;
static immutable
Vector e3;
static immutable
Vector e1;
static immutable
Vector e2;
static immutable
Vector e3;
static immutable
Vector e4;
}

Constructors

this
this(S scalar)

Construct from Scalar value.

this
this(Args args)

Construct from combination of arguments.

Members

Functions

clear
void clear(V value)
magnitude
real magnitude()
magnitudeSquared
real magnitudeSquared()
normalize
void normalize()

Normalize this.

normalized
Vector normalized()
nrnNorm
auto nrnNorm()
ok
bool ok()
opBinary
Vector!(E, T.rows) opBinary(T rhs)

Multiply with right-hand-side rhs.

opBinaryRight
auto opBinaryRight(T lhs)

Multiply with left-hand-side lhs.

opIndex
inout(E) opIndex(uint i)
opOpAssign
void opOpAssign(F r)

TODO Suitable Restrictions on F.

opSlice
auto opSlice()
opSlice
auto opSlice(uint off, uint len)
toLaTeX
string toLaTeX()
update
void update(Vector!(E, D) other)

Updates the vector with the values from other.

Templates

coordToIndex
template coordToIndex(char c)

Coordinate Character c to Index

Variables

_vector
E[D] _vector;

Element data.

See Also

Meta