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
)
) {}

Constructors

this
this(V vec)
Undocumented in source.
this
this(S scalar)

Construct from Scalar value.

this
this(Args args)

Construct from combination of arguments.

Members

Aliases

norm
alias norm = magnitude
Undocumented in source.
w
alias w = get_!'w'
Undocumented in source.
x
alias x = get_!'x'
Undocumented in source.
y
alias y = get_!'y'
Undocumented in source.
z
alias z = get_!'z'
Undocumented in source.

Enums

isCompatibleMatrix
eponymoustemplate isCompatibleMatrix(T)
Undocumented in source.
isCompatibleVector
eponymoustemplate isCompatibleVector(T)
Undocumented in source.

Functions

clear
void clear(V value)
normalize
void normalize()

Normalize this.

nrnNorm
auto nrnNorm()
opBinary
auto opBinary(T rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Vector opBinary(F r)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Vector!(CommonType!(E, F), D) opBinary(Vector!(F, D) r)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(S scalar)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(F vec)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(F[] array)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
inout(E) opIndex(uint i)
opOpAssign
void opOpAssign(F r)

TODO: Suitable Restrictions on F.

opOpAssign
void opOpAssign(Vector r)
Undocumented in source. Be warned that the author may not have intended to support it.
opSlice
auto opSlice()
opSlice
auto opSlice(uint off, uint len)
opUnary
inout(Vector) opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
Vector opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
randInPlace
auto randInPlace(E scaling)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(E x, E y)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(E x, E y, E z)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(E x, E y, E z, E w)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
void toString(Sink sink)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update(Vector!(E, D) other)

Updates the vector with the values from other.

Manifest constants

dimension
enum dimension;
Undocumented in source.

Properties

joinString
string joinString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
magnitude
real magnitude [@property getter]
magnitudeSquared
real magnitudeSquared [@property getter]
normalized
Vector normalized [@property getter]
ok
bool ok [@property getter]
orientationString
string orientationString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
toLaTeX
string toLaTeX [@property getter]
toMathML
string toMathML [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

isCompatibleMatrixImpl
void isCompatibleMatrixImpl(Matrix!(E, r, c) m)
Undocumented in source. Be warned that the author may not have intended to support it.
isCompatibleVectorImpl
void isCompatibleVectorImpl(Vector!(E, d) vec)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

E0
auto E0;
Undocumented in source.
E1
auto E1;
Undocumented in source.
e1
Vector e1;

canonical basis for Euclidian space

e1
Vector e1;

canonical basis for Euclidian space

e1
Vector e1;
e2
Vector e2;
e3
Vector e3;
e4
Vector e4;

canonical basis for Euclidian space

Templates

coordToIndex
template coordToIndex(char c)

Coordinate Character c to Index

Variables

_vector
E[D] _vector;

Element data.

See Also

Meta