des.math.linear.vector

Provides work with linear algebra vector and some aliases and functions.

Members

Aliases

Vector2
alias Vector2(T) = Vector!(2, T)
Vector3
alias Vector3(T) = Vector!(3, T)
Vector4
alias Vector4(T) = Vector!(4, T)
bvec
alias bvec(size_t N) = Vector!(N, byte)
bvec2
alias bvec2 = bvec!2
bvec3
alias bvec3 = bvec!3
bvec4
alias bvec4 = bvec!4
bvecD
alias bvecD = Vector!(0, byte)
dvec
alias dvec(size_t N) = Vector!(N, double)
dvec2
alias dvec2 = dvec!2
dvec3
alias dvec3 = dvec!3
dvec4
alias dvec4 = dvec!4
dvecD
alias dvecD = Vector!(0, double)
fvec
alias fvec(size_t N) = Vector!(N, float)
ivec
alias ivec(size_t N) = Vector!(N, int)
ivec2
alias ivec2 = ivec!2
ivec3
alias ivec3 = ivec!3
ivec4
alias ivec4 = ivec!4
ivecD
alias ivecD = Vector!(0, int)
lvec
alias lvec(size_t N) = Vector!(N, long)
lvec2
alias lvec2 = lvec!2
lvec3
alias lvec3 = lvec!3
lvec4
alias lvec4 = lvec!4
lvecD
alias lvecD = Vector!(0, long)
rvec
alias rvec(size_t N) = Vector!(N, real)
rvec2
alias rvec2 = rvec!2
rvec3
alias rvec3 = rvec!3
rvec4
alias rvec4 = rvec!4
rvecD
alias rvecD = Vector!(0, real)
svecD
alias svecD = Vector!(0, short)
ubvec
alias ubvec(size_t N) = Vector!(N, ubyte)
ubvec2
alias ubvec2 = ubvec!2
ubvec3
alias ubvec3 = ubvec!3
ubvec4
alias ubvec4 = ubvec!4
ubvecD
alias ubvecD = Vector!(0, ubyte)
uivec
alias uivec(size_t N) = Vector!(N, uint)
uivec2
alias uivec2 = uivec!2
uivec3
alias uivec3 = uivec!3
uivec4
alias uivec4 = uivec!4
uivecD
alias uivecD = Vector!(0, uint)
ulvec
alias ulvec(size_t N) = Vector!(N, ulong)
ulvec2
alias ulvec2 = ulvec!2
ulvec3
alias ulvec3 = ulvec!3
ulvec4
alias ulvec4 = ulvec!4
ulvecD
alias ulvecD = Vector!(0, ulong)
usvecD
alias usvecD = Vector!(0, ushort)
vec2
alias vec2 = fvec!2
vec3
alias vec3 = fvec!3
vec4
alias vec4 = fvec!4
vecD
alias vecD = Vector!(0, float)

Functions

cross
auto cross(in Vector!(N, T) a, in Vector!(K, E) b)

cross multiplication for compaitable vectors.

dot
auto dot(in Vector!(N, T) a, in Vector!(K, E) b)

dot multiplication for compaitable vectors.

isValidOp
bool isValidOp()

validate operation between types T and E code: mixin( return is( typeof( T.init ~ op ~ E.init ) : K ); );

Mixin templates

accessByString
mixin template accessByString(size_t N, T, string data, string AS, string VVASES = " ", string VVASVS = "|")

Structs

Vector
struct Vector(size_t N, T)

Templates

isDynamicVector
template isDynamicVector(E)

checks type is dynamic vector

isSpecVector
template isSpecVector(size_t N, T, E)

сhecks type E is vector and E.dims == N and E.datatype can casted to T

isStaticVector
template isStaticVector(E)

checks type is static vector

isVector
template isVector(E)

checks type is vector

Meta