carbon.linear

このモジュールは、式テンプレートベースの試験的な行列演算モジュールです。

Members

Aliases

Msize_t
alias Msize_t = ptrdiff_t
Undocumented in source.

Enums

ETOSpec
enum ETOSpec

式テンプレート演算子の種類

Major
enum Major

行列の格納方式

hasDynamicColumns
eponymoustemplate hasDynamicColumns(T)

列の大きさが動的な行列型かどうか判定します

hasDynamicLength
eponymoustemplate hasDynamicLength(T)

大きさが動的なベクトル型かどうか判定します

hasDynamicRows
eponymoustemplate hasDynamicRows(T)

行の大きさが動的な行列型かどうか判定します

hasStaticCols
eponymoustemplate hasStaticCols(T)

列の大きさが静的な行列型かどうか判定します

hasStaticLength
eponymoustemplate hasStaticLength(T)

大きさが静的なベクトル型かどうか判定します

hasStaticRows
eponymoustemplate hasStaticRows(T)

行の大きさが静的な行列型かどうか判定します

isMatrix
eponymoustemplate isMatrix(T)

行列型かどうかを判定します

isNarrowMatrix
eponymoustemplate isNarrowMatrix(T)
isNarrowVector
eponymoustemplate isNarrowVector(V)

ベクトル型かどうか判定します

Functions

assignAt
void assignAt(R r, size_t i, size_t j, E e)
Undocumented in source. Be warned that the author may not have intended to support it.
assignAt
void assignAt(R r, size_t i, size_t j, E e)
Undocumented in source.
assignAt
void assignAt(M m, size_t i, E e)
Undocumented in source. Be warned that the author may not have intended to support it.
at
auto ref at(R r, size_t i, size_t j)
Undocumented in source. Be warned that the author may not have intended to support it.
at
auto ref at(R r, size_t i, size_t j)
Undocumented in source.
at
auto ref at(M m, size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
cartesian
auto cartesian(V1 vec1, V2 vec2)

直積

cols
size_t cols(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
cols
size_t cols(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
columnVectors
auto columnVectors(A mat)

行ベクトルのランダムアクセスレンジ

congeal
auto congeal(A mat)
auto congeal(A mat, size_t r, size_t c)

InferableMatrixをある大きさの行列へ固定します。

congeal
auto congeal(A mat)

DynamicMatrixをある大きさへ固定します。

cross
auto cross(V1 vec1, V2 vec2)

ベクトル同士のクロス積

dot
auto dot(V1 vec1, V2 vec2)
Undocumented in source.
hermitian
auto hermitian(A mat)

エルミート行列を返します

matrix
auto matrix(S sizes)
matrix
auto matrix(size_t r, size_t c)
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
auto matrix()
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
DMatrix!(T, r, c, mjr) matrix(size_t[N] size)
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
DMatrix!(T, r, c, mjr) matrix(T[] arr)
Undocumented in source.
matrix
DMatrix!(T, wild, wild, mjr) matrix(T[] arr, size_t r, size_t c)
Undocumented in source.
matrix
auto matrix(T[M][N] arr)
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
auto matrix(A mat)
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
auto matrix(A mat)
Undocumented in source. Be warned that the author may not have intended to support it.
matrix
auto matrix(A mat, size_t r, size_t c)
Undocumented in source.
matrixExpression
auto matrixExpression(A a, B b)

式テンプレートでの、式を表します

norm
auto norm(V v)

ベクトルのノルムを計算します

permutation
auto permutation(size_t[] pos)

置換行列を作ります

pluDecomposeInPlace
PLU!(A) pluDecomposeInPlace(A m)

In-Placeで、行列をLU分解します。

pref
auto pref(NMatrix nm)
Undocumented in source. Be warned that the author may not have intended to support it.
rowVectors
auto rowVectors(A mat)

行ベクトルのランダムアクセスレンジ

rows
size_t rows(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
rows
size_t rows(R r)
Undocumented in source. Be warned that the author may not have intended to support it.
staticCols
size_t staticCols()
Undocumented in source. Be warned that the author may not have intended to support it.
staticCols
size_t staticCols()
Undocumented in source. Be warned that the author may not have intended to support it.
staticCols
size_t staticCols()
Undocumented in source. Be warned that the author may not have intended to support it.
staticRows
size_t staticRows()
Undocumented in source. Be warned that the author may not have intended to support it.
staticRows
size_t staticRows()
Undocumented in source. Be warned that the author may not have intended to support it.
staticRows
size_t staticRows()
Undocumented in source. Be warned that the author may not have intended to support it.
sub
auto sub(A mat)

部分行列を返します

swizzle
auto swizzle(A mat)

swizzle : glm参照

toFlatten
auto toFlatten(A mat)

行列をレンジにします

toMatrix
auto toMatrix(R range)

レンジから行列を作ります。

toMatrix
auto toMatrix(R range)
Undocumented in source. Be warned that the author may not have intended to support it.
toRange
auto toRange(A mat)
trace
ElementType!A trace(A mat)

行列の跡(trace)を返します。正方行列についてのみ定義されます

Manifest constants

defaultMajor
enum defaultMajor;

デフォルトでの行列の格納方式は「行優先」です。

Properties

identity
auto identity [@property getter]

単位行列

ones
auto ones [@property getter]

全要素が1な行列を返します。

transpose
auto transpose [@property getter]

転置行列を返します。

Structs

DMatrix
struct DMatrix(T, Msize_t rs = dynamic, Msize_t cs = dynamic, Major mjr = Major.row)

内部で2次元配列を持つ行列です

InferredResult
struct InferredResult

大きさが推論される行列が、推論結果を返す際の結果の型です。

MatrixExpression
struct MatrixExpression(Lhs, string s, Rhs)

式テンプレートでの、式を表します

PLU
struct PLU(M)
Undocumented in source.
PMatrix
struct PMatrix(M)

ポインタを管理します

SMatrix
struct SMatrix(T, Msize_t rs = 0, Msize_t cs = 0, Major mjr = Major.row)

要素がメモリ上に連続して存在するような行列

Templates

ETOperatorSpec
template ETOperatorSpec(A, string op, B)

式テンプレートでの演算子の種類を返します

ElementType
template ElementType(A)

行列型の要素の型を取得します

ExpressionOperators
template ExpressionOperators(size_t spec, size_t rs, size_t cs)
ExpressionOperatorsInferable
template ExpressionOperatorsInferable(size_t spec)

specに示された演算子をオーバーロードします。specはETOSpecで指定する必要があります。

SCVector
template SCVector(T, Msize_t size)
SRVector
template SRVector(T, Msize_t size)
SVector
template SVector(T, Msize_t size)

要素がメモリ上に連続して存在するような行列

defaultExprOps
template defaultExprOps(bool isInferable = false)

全ての演算子をオーバーロードします。

hasAssignableElements
template hasAssignableElements(A)

A型の行列の要素にElementType!A型の値が代入可能かどうかをチェックします。

hasLvalueElements
template hasLvalueElements(A)

その行列の要素がstd.algorithm.swapを呼べるかどうかをチェックします

isPermutationMatrix
template isPermutationMatrix(A)
Undocumented in source.
isValidOperator
template isValidOperator(L, string op, R)

正しい演算かどうか判定します

isValidOperatorImpl
template isValidOperatorImpl(L, string op, R)
Undocumented in source.
isValidOperatorImpl
template isValidOperatorImpl(L, string op, R)
Undocumented in source.
isValidOperatorImpl
template isValidOperatorImpl(L, string op, R)
dynamic
enum Msize_t dynamic;
Undocumented in source.

Variables

hasView
enum bool hasView(T);

行列やベクトルのビューを取得します。

isAbstractMatrix
enum bool isAbstractMatrix(T);

大きさが推論される行列かどうか判定します

isNotVectorOrMatrix
enum bool isNotVectorOrMatrix(T);

行列型でも、ベクトル型でもないような型

isVector
enum bool isVector(T);

ベクトル型かどうか判定します

wild
enum Msize_t wild;
Undocumented in source.

Meta