plll
1.0
|
Contains the matrix and vector library as long as other linear algebra functionality. More...
Classes | |
class | base_colvector |
Represents a column vector with coefficients in T . More... | |
class | base_matrix |
Represents a matrix with coefficients in T . More... | |
class | base_rowvector |
Represents a row vector with coefficients in T . More... | |
class | math_colvector |
Represents a math column vector with coefficients in T . More... | |
class | math_matrix |
Represents a math matrix with coefficients in T . More... | |
class | math_rowvector |
Represents a math row vector with coefficients in T . More... | |
class | storage_traits |
Provides means to allocate, reallocate and release (linear) arrays of objects of type T. More... | |
Typedefs | |
typedef unsigned int | size_type |
Enumerations | |
enum | { Flexible = -1 } |
Functions | |
Linear algebra over rationals and integers. | |
unsigned | hnf (math_matrix< arithmetic::Integer > &A) |
Computes the Hermite Normal Form (HNF) of the given matrix A by applying row operations. More... | |
unsigned | hnf (math_matrix< arithmetic::Integer > &A, math_matrix< arithmetic::Integer > &T) |
Computes the Hermite Normal Form (HNF) of the given matrix A by applying row operations, together with a transformation matrix T . More... | |
arithmetic::Integer | det (const math_matrix< arithmetic::Integer > &A) |
Computes the determinant of an integer matrix A . More... | |
math_matrix< arithmetic::Integer > | solveUniqInt (const math_matrix< arithmetic::Integer > &A, const math_matrix< arithmetic::Integer > &w, const arithmetic::Integer &startPrime=arithmetic::Integer()) |
Assumes that A is a square matrix and that the equation A * res == w has a unique solutions in the integers. Returns the. More... | |
void | invert (math_matrix< arithmetic::Integer > &inverse, const math_matrix< arithmetic::Integer > &A, const arithmetic::Integer &startPrime=arithmetic::Integer()) |
Assumes that A is invertible. Inverts the matrix A and stores the result in inverse . More... | |
std::pair< math_colvector < arithmetic::Integer > , arithmetic::Integer > | solve (const math_matrix< arithmetic::Integer > &A, const math_colvector< arithmetic::Integer > &b) |
Solves the linear system A * x == b over the rationals. More... | |
math_colvector < arithmetic::Integer > | solveInt (const math_matrix< arithmetic::Integer > &A, const math_colvector< arithmetic::Integer > &w) |
Assumes that the linear system A * v == w has a solution in the integers. Finds this solution. More... | |
math_matrix< arithmetic::Integer > | kernel (const math_matrix< arithmetic::Integer > &A) |
Computes a -basis of the right-kernel of A . More... | |
Swap functions. | |
template<typename T , int R, int C, typename ST , bool MO> | |
void | swap (base_matrix< T, R, C, ST, MO > &A, base_matrix< T, R, C, ST, MO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps matrices A and B efficiently. More... | |
template<typename T , int R1, int C1, int R2, int C2, typename ST , bool MO1, bool MO2> | |
void | swap (base_matrix< T, R1, C1, ST, MO1 > &A, base_matrix< T, R2, C2, ST, MO2 > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Swaps matrices A and B efficiently. More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
void | swap (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::do_swap(A, B))) |
Swaps matrices A and B componentwise. More... | |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
void | swap (const implementation::expressions::expr< AOp, AData > &A, base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(linalg::swap(A, implementation::expressions::make_matrix_expression(B)))) |
Swaps matrices A and B componentwise. More... | |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
void | swap (base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(linalg::swap(implementation::expressions::make_matrix_expression(A), B))) |
Swaps matrices A and B componentwise. More... | |
template<typename T , int ARows, int ACols, typename AST , bool AMO, int BRows, int BCols, typename BST , bool BMO> | |
void | swap (base_matrix< T, ARows, ACols, AST, AMO > &A, base_matrix< T, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(linalg::swap(implementation::expressions::make_matrix_expression(A), implementation::expressions::make_matrix_expression(B)))) |
Swaps matrices A and B componentwise. More... | |
Assignment functions. | |
template<template< typename SourceData > class SourceOp, typename SourceData , template< typename DestData > class DestOp, typename DestData , bool move> | |
void | assign (const implementation::expressions::expr< DestOp, DestData > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source, helper::BoolToType< move > ittm) |
Assigns the content of matrix source to matrix destination . Allows to force move. More... | |
template<template< typename SourceData > class SourceOp, typename SourceData , template< typename DestData > class DestOp, typename DestData > | |
void | assign (const implementation::expressions::expr< DestOp, DestData > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source) |
Assigns the content of matrix source to matrix destination . More... | |
template<typename SourceT , int SourceRows, int SourceCols, typename SourceST , bool SourceMO, template< typename DestData > class DestOp, typename DestData > | |
void | assign (const implementation::expressions::expr< DestOp, DestData > &destination, const base_matrix< SourceT, SourceRows, SourceCols, SourceST, SourceMO > &source) |
Assigns the content of matrix source to matrix destination . More... | |
template<template< typename SourceData > class SourceOp, typename SourceData , typename DestT , int DestRows, int DestCols, typename DestST , bool DestMO> | |
void | assign (base_matrix< DestT, DestRows, DestCols, DestST, DestMO > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source) |
Assigns the content of matrix source to matrix destination . More... | |
template<typename SourceT , int SourceRows, int SourceCols, typename SourceST , bool SourceMO, typename DestT , int DestRows, int DestCols, typename DestST , bool DestMO> | |
void | assign (base_matrix< DestT, DestRows, DestCols, DestST, DestMO > &destination, const base_matrix< SourceT, SourceRows, SourceCols, SourceST, SourceMO > &source) |
Assigns the content of matrix source to matrix destination . More... | |
Transpose functions. | |
template<template< typename SourceData > class SourceOp, typename SourceData , template< typename DestData > class DestOp, typename DestData , bool move> | |
void | transpose (const implementation::expressions::expr< DestOp, DestData > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source, helper::BoolToType< move > ittm) |
Transposes the content of matrix source and stores the result in the matrix destination . Allows to force move. More... | |
template<template< typename SourceData > class SourceOp, typename SourceData , template< typename DestData > class DestOp, typename DestData > | |
void | transpose (const implementation::expressions::expr< DestOp, DestData > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source) |
Transposes the content of matrix source and stores the result in the matrix destination . More... | |
template<typename SourceT , int SourceRows, int SourceCols, typename SourceST , bool SourceMO, template< typename DestData > class DestOp, typename DestData > | |
void | transpose (const implementation::expressions::expr< DestOp, DestData > &destination, const base_matrix< SourceT, SourceRows, SourceCols, SourceST, SourceMO > &source) |
Transposes the content of matrix source and stores the result in the matrix destination . More... | |
template<template< typename SourceData > class SourceOp, typename SourceData , typename DestT , int DestRows, int DestCols, typename DestST , bool DestMO> | |
void | transpose (base_matrix< DestT, DestRows, DestCols, DestST, DestMO > &destination, const implementation::expressions::expr< SourceOp, SourceData > &source) |
Transposes the content of matrix source and stores the result in the matrix destination . More... | |
template<typename SourceT , int SourceRows, int SourceCols, typename SourceST , bool SourceMO, typename DestT , int DestRows, int DestCols, typename DestST , bool DestMO> | |
void | transpose (base_matrix< DestT, DestRows, DestCols, DestST, DestMO > &destination, const base_matrix< SourceT, SourceRows, SourceCols, SourceST, SourceMO > &source) |
Transposes the content of matrix source and stores the result in the matrix destination . More... | |
Operators. | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::Mul_ReturnType | operator* (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::multiply(A, B))) |
Computes the product of A with B . More... | |
template<typename T , int Rows, int Cols, typename ST > | |
implementation::BinaryMatrixOperationImpl < T, base_matrix< T, Rows, Cols, ST, true > >::Mul_ReturnType | operator* (const T &A, const base_matrix< T, Rows, Cols, ST, true > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< T, base_matrix< T, Rows, Cols, ST, true > >::multiply(A, B))) |
Computes the product of A with B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::Div_ReturnType | operator/ (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::divide(A, B))) |
Computes the componentwise division of A with the scalar B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::Mod_ReturnType | operator% (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::modulo(A, B))) |
Computes the componentwise modulo of A with the scalar B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::CwMul_ReturnType | componentwise_mul (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::componentwise_mul(A, B))) |
Computes the componentwise multiplication of A with B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::CwDiv_ReturnType | componentwise_div (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::componentwise_div(A, B))) |
Computes the componentwise division of A with B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::CwMod_ReturnType | componentwise_mod (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::componentwise_mod(A, B))) |
Computes the componentwise modulo of A with B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::Add_ReturnType | operator+ (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::add(A, B))) |
Computes the sum of A and B . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::BinaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true >, MT > ::Sub_ReturnType | operator- (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::sub(A, B))) |
Computes the difference of A and B . More... | |
template<typename T , int Rows, int Cols, typename ST > | |
implementation::UnaryMatrixOperationImpl < base_matrix< T, Rows, Cols, ST, true > >::Neg_ReturnType | operator- (const base_matrix< T, Rows, Cols, ST, true > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::UnaryMatrixOperationImpl< base_matrix< T, Rows, Cols, ST, true > >::negate(A))) |
Computes the negation of A . More... | |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::Mul_ReturnType | operator* (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::multiply(A, B))) |
template<template< typename DataType > class Operator, typename Data > | |
implementation::BinaryMatrixOperationImpl < typename implementation::MatrixInfo < implementation::expressions::expr < Operator, Data > >::Type, implementation::expressions::expr < Operator, Data > >::Mul_ReturnType | operator* (const typename implementation::MatrixInfo< implementation::expressions::expr< Operator, Data > >::Type &A, const implementation::expressions::expr< Operator, Data > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< typename implementation::MatrixInfo< implementation::expressions::expr< Operator, Data > >::Type, implementation::expressions::expr< Operator, Data > >::multiply(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::Div_ReturnType | operator/ (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::divide(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::Mod_ReturnType | operator% (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::modulo(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::CwMul_ReturnType | componentwise_mul (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::componentwise_mul(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::CwDiv_ReturnType | componentwise_div (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::componentwise_div(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::CwMod_ReturnType | componentwise_mod (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::componentwise_mod(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::Add_ReturnType | operator+ (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::add(A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::BinaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data >, MT > ::Mul_ReturnType | operator- (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::BinaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data >, MT >::sub(A, B))) |
template<template< typename DataType > class Operator, typename Data > | |
implementation::UnaryMatrixOperationImpl < implementation::expressions::expr < Operator, Data > >::Neg_ReturnType | operator- (const implementation::expressions::expr< Operator, Data > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::UnaryMatrixOperationImpl< implementation::expressions::expr< Operator, Data > >::negate(A))) |
Functional versions of operators. | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | mul (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::multiply(A, B)))) |
Computes the product of A and B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | div (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::divide(A, B)))) |
Computes the componentwise division of A by B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | mod (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::modulo(A, B)))) |
Computes the componentwise modulo of A by B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | componentwise_mul (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_mul(A, B)))) |
Computes the componentwise product of A and B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | componentwise_div (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_div(A, B)))) |
Computes the componentwise division of A by B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | componentwise_mod (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_mod(A, B)))) |
Computes the componentwise modulo of A by B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | add (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::add(A, B)))) |
Computes the sum of A and B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT1 , typename MT2 > | |
void | sub (base_matrix< T, Rows, Cols, ST, true > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::sub(A, B)))) |
Computes the difference of A and B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
void | neg (base_matrix< T, Rows, Cols, ST, true > &result, const MT &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::UnaryMatrixOperationImpl< MT >::negate(A)))) |
Computes the negation of A and stores the result in result . More... | |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | mul (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::multiply(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | div (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::divide(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | mod (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::modulo(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | componentwise_mul (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_mul(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | componentwise_div (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_div(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | componentwise_mod (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::componentwise_mod(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | add (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::add(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT1 , typename MT2 > | |
void | sub (const implementation::expressions::expr< Operator, Data > &result, const MT1 &A, const MT2 &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::BinaryMatrixOperationImpl< MT1, MT2 >::sub(A, B)))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
void | neg (const implementation::expressions::expr< Operator, Data > &result, const MT &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(assign(result, implementation::UnaryMatrixOperationImpl< MT >::negate(A)))) |
Assignment-operation operators. | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
base_matrix< T, Rows, Cols, ST, true > & | operator+= (base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)+=B)) |
Adds B to the current matrix. More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
base_matrix< T, Rows, Cols, ST, true > & | operator-= (base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)-=B)) |
Subtracts B from the current matrix. More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
base_matrix< T, Rows, Cols, ST, true > & | operator*= (base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)*=B)) |
Multiplies the current matrix with B and stores the result in the current matrix. More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
base_matrix< T, Rows, Cols, ST, true > & | operator/= (base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)/=B)) |
Divides the current matrix by the scalar B and stores the result in the current matrix. More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
base_matrix< T, Rows, Cols, ST, true > & | operator%= (base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)%=B)) |
Takes the current matrix modulo the scalar B and stores the result in the current matrix. More... | |
template<template< typename DataType > class Op, typename Data , typename MT > | |
const implementation::expressions::expr < Op, Data > & | operator+= (const implementation::expressions::expr< Op, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::AssignmentMatrixOperationImpl< implementation::expressions::expr< Op, Data >, MT >::add_assign(A, B))) |
template<template< typename DataType > class Op, typename Data , typename MT > | |
const implementation::expressions::expr < Op, Data > & | operator-= (const implementation::expressions::expr< Op, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::AssignmentMatrixOperationImpl< implementation::expressions::expr< Op, Data >, MT >::sub_assign(A, B))) |
template<template< typename DataType > class Op, typename Data , typename MT > | |
const implementation::expressions::expr < Op, Data > & | operator*= (const implementation::expressions::expr< Op, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::AssignmentMatrixOperationImpl< implementation::expressions::expr< Op, Data >, MT >::mul_assign(A, B))) |
template<template< typename DataType > class Op, typename Data , typename MT > | |
const implementation::expressions::expr < Op, Data > & | operator/= (const implementation::expressions::expr< Op, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::AssignmentMatrixOperationImpl< implementation::expressions::expr< Op, Data >, MT >::div_assign(A, B))) |
template<template< typename DataType > class Op, typename Data , typename MT > | |
const implementation::expressions::expr < Op, Data > & | operator%= (const implementation::expressions::expr< Op, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::AssignmentMatrixOperationImpl< implementation::expressions::expr< Op, Data >, MT >::mod_assign(A, B))) |
Other operations. | |
template<typename RetType , typename T , int Rows, int Cols, typename ST > | |
void | sum (RetType &result, const base_matrix< T, Rows, Cols, ST, true > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::SumImpl< base_matrix< T, Rows, Cols, ST, true > >::sum(result, A))) |
Computes the sum of all entries of A and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST > | |
implementation::SumImpl < base_matrix< T, Rows, Cols, ST, true > >::RetValue | sum (const base_matrix< T, Rows, Cols, ST, true > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::SumImpl< base_matrix< T, Rows, Cols, ST, true > >::sum(A))) |
Computes the sum of all entries of A and returns the result. More... | |
template<typename RetType , template< typename DataType > class Operator, typename Data > | |
void | sum (RetType &result, const implementation::expressions::expr< Operator, Data > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::SumImpl< implementation::expressions::expr< Operator, Data > >::sum(result, A))) |
template<template< typename DataType > class Operator, typename Data > | |
implementation::SumImpl < implementation::expressions::expr < Operator, Data > >::RetValue | sum (const implementation::expressions::expr< Operator, Data > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::SumImpl< implementation::expressions::expr< Operator, Data > >::sum(A))) |
template<typename RetType , typename T , int Rows, int Cols, typename ST , typename MT > | |
void | dot (RetType &result, const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::DotImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::dot(result, A, B))) |
Computes the dot product of A and B and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST , typename MT > | |
implementation::DotImpl < base_matrix< T, Rows, Cols, ST, true >, MT >::RetValue | dot (const base_matrix< T, Rows, Cols, ST, true > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::DotImpl< base_matrix< T, Rows, Cols, ST, true >, MT >::dot(A, B))) |
Computes the dot product of A and B and returns the result. More... | |
template<typename RetType , template< typename DataType > class Operator, typename Data , typename MT > | |
void | dot (RetType &result, const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::DotImpl< implementation::expressions::expr< Operator, Data >, MT >::dot(result, A, B))) |
template<template< typename DataType > class Operator, typename Data , typename MT > | |
implementation::DotImpl < implementation::expressions::expr < Operator, Data >, MT > ::RetValue | dot (const implementation::expressions::expr< Operator, Data > &A, const MT &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::DotImpl< implementation::expressions::expr< Operator, Data >, MT >::dot(A, B))) |
template<typename RetType , typename T , int Rows, int Cols, typename ST > | |
void | normSq (RetType &result, const base_matrix< T, Rows, Cols, ST, true > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::NormSqImpl< base_matrix< T, Rows, Cols, ST, true > >::normSq(result, A))) |
Computes the squared norm of A , i.e. the sum of the squares of all entries of A , and stores the result in result . More... | |
template<typename T , int Rows, int Cols, typename ST > | |
implementation::NormSqImpl < base_matrix< T, Rows, Cols, ST, true > >::RetValue | normSq (const base_matrix< T, Rows, Cols, ST, true > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::NormSqImpl< base_matrix< T, Rows, Cols, ST, true > >::normSq(A))) |
Computes the squared norm of A , i.e. the sum of the squares of all entries of A , and returns the result. More... | |
template<typename RetType , template< typename DataType > class Operator, typename Data > | |
void | normSq (RetType &result, const implementation::expressions::expr< Operator, Data > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::NormSqImpl< implementation::expressions::expr< Operator, Data > >::normSq(result, A))) |
template<template< typename DataType > class Operator, typename Data > | |
implementation::NormSqImpl < implementation::expressions::expr < Operator, Data > >::RetValue | normSq (const implementation::expressions::expr< Operator, Data > &A) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::NormSqImpl< implementation::expressions::expr< Operator, Data > >::normSq(A))) |
template<typename T , int Rows, int Cols, typename ST , typename T1 , typename T2 > | |
void | addmul (base_matrix< T, Rows, Cols, ST, true > &A, const T1 &B, const T2 &C) |
Computes A += B * C . More... | |
template<typename T , int Rows, int Cols, typename ST , typename T1 , typename T2 > | |
void | submul (base_matrix< T, Rows, Cols, ST, true > &A, const T1 &B, const T2 &C) |
Computes A -= B * C . More... | |
template<template< typename DataType > class Op, typename Data , typename T1 , typename T2 > | |
void | addmul (const implementation::expressions::expr< Op, Data > &A, const T1 &B, const T2 &C) |
template<template< typename DataType > class Op, typename Data , typename T1 , typename T2 > | |
void | submul (const implementation::expressions::expr< Op, Data > &A, const T1 &B, const T2 &C) |
Comparisons. | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
int | compare (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::compare(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
int | compare (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(compare(A, implementation::expressions::make_matrix_expression(B)))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
int | compare (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(compare(implementation::expressions::make_matrix_expression(A), B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
int | compare (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(compare(implementation::expressions::make_matrix_expression(A), implementation::expressions::make_matrix_expression(B)))) |
Lexicographically compares the matrices A and B . More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator== (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::eq(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator== (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A==implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator== (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)==B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator== (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)==implementation::expressions::make_matrix_expression(B))) |
Tests A and B for equality. More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator!= (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::neq(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator!= (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A!=implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator!= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)!=B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator!= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)!=implementation::expressions::make_matrix_expression(B))) |
Tests A and B for inequality. More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator< (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::less(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator< (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A< implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator< (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)< B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator< (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)< implementation::expressions::make_matrix_expression(B))) |
Tests A and B lexicographically for A being less than B . More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator<= (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::less_eq(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator<= (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A<=implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator<= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)<=B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator<= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A)<=implementation::expressions::make_matrix_expression(B))) |
Tests A and B lexicographically for A being less than or equal to B . More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator> (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::greater(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator> (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A > implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator> (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A) > B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator> (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A) > implementation::expressions::make_matrix_expression(B))) |
Tests A and B lexicographically for A being greater than B . More... | |
template<template< typename AData > class AOp, typename AData , template< typename BData > class BOp, typename BData > | |
bool | operator>= (const implementation::expressions::expr< AOp, AData > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::comparison_impl< implementation::expressions::expr< AOp, AData >, implementation::expressions::expr< BOp, BData > >::greater_eq(A, B))) |
template<template< typename AData > class AOp, typename AData , typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator>= (const implementation::expressions::expr< AOp, AData > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(A >=implementation::expressions::make_matrix_expression(B))) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, template< typename BData > class BOp, typename BData > | |
bool | operator>= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const implementation::expressions::expr< BOp, BData > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A) >=B)) |
template<typename AT , int ARows, int ACols, typename AST , bool AMO, typename BT , int BRows, int BCols, typename BST , bool BMO> | |
bool | operator>= (const base_matrix< AT, ARows, ACols, AST, AMO > &A, const base_matrix< BT, BRows, BCols, BST, BMO > &B) PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(implementation::expressions::make_matrix_expression(A) >=implementation::expressions::make_matrix_expression(B))) |
Tests A and B lexicographically for A being greater than or equal to B . More... | |
Initializers. | |
template<typename S > | |
implementation::Initialize_Impl < S, false > | Initialize (const S &ref) PLLL_INTERNAL_NOTHROW_POSTFIX_INLINE |
Creates an initializer object to initialize with the given reference. More... | |
template<typename S > | |
implementation::Initialize_Impl < S, true > | Initialize () PLLL_INTERNAL_NOTHROW_POSTFIX_CONDITIONAL(noexcept(S())) |
Creates an initializer object to default-initialize with type S . More... | |
Stream input/output | |
template<typename MatrixType , bool forceGeneric> | |
void | print_matrix (std::ostream &s, const MatrixType &mat) |
Prints the given matrix mat to the output stream s . More... | |
template<typename MatrixType > | |
void | print_matrix (std::ostream &s, const MatrixType &mat, bool forceGeneric=false) |
Prints the given matrix mat to the output stream s . More... | |
template<typename T , int Rows, int Cols, typename ST , bool MO> | |
std::ostream & | operator<< (std::ostream &s, const base_matrix< T, Rows, Cols, ST, MO > &mat) |
Prints the given matrix mat to the output stream s . More... | |
template<template< typename DataType > class Operator, typename Data > | |
std::ostream & | operator<< (std::ostream &s, const implementation::expressions::expr< Operator, Data > &mat) |
Prints the given matrix mat to the output stream s . More... | |
template<typename MatrixType > | |
bool | scan_matrix (std::istream &s, MatrixType &mat) |
Reads a matrix from the input stream s and stores it in mat . More... | |
template<typename MatrixType > | |
bool | scan_matrix (std::istream &s, const MatrixType &mat) |
Reads a matrix from the input stream s and stores it in mat . More... | |
template<typename MatrixType , typename T > | |
bool | scan_matrix (std::istream &s, MatrixType &mat, const T &default_object) |
Reads a matrix from the input stream s and stores it in mat . More... | |
template<typename MatrixType , typename T > | |
bool | scan_matrix (std::istream &s, const MatrixType &mat, const T &default_object) |
Reads a matrix from the input stream s and stores it in mat . More... | |
template<typename T , int Rows, int Cols, typename ST , bool MO> | |
std::istream & | operator>> (std::istream &s, base_matrix< T, Rows, Cols, ST, MO > &mat) |
Reads a matrix from the input stream s and stores it in mat . More... | |
template<template< typename DataType > class Op, typename Data > | |
std::istream & | operator>> (std::istream &s, const implementation::expressions::expr< Op, Data > &mat) |
Reads a matrix from the input stream s and stores it in mat . More... | |
Contains the matrix and vector library as long as other linear algebra functionality.
The plll::linalg
namespace contains the matrix and vector library as long as other linear algebra functionality of plll
.
typedef unsigned int plll::linalg::size_type |
Type used for indices and sizes.
Definition at line 141 of file matrix.hpp.
anonymous enum |
Enumerator | |
---|---|
Flexible |
Identifier to make number of rows and/or columns flexible instead of determined at compile time. |
Definition at line 72 of file matrix.hpp.
|
noexcept |
Computes the sum of A
and B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a matrix. |
Definition at line 774 of file matrix-ops2.hpp.
void plll::linalg::addmul | ( | base_matrix< T, Rows, Cols, ST, true > & | A, |
const T1 & | B, | ||
const T2 & | C | ||
) |
Computes A += B * C
.
A | The variable to add the product to. |
B | The first operand of the product. |
C | The second operand of the product. |
Definition at line 1380 of file matrix-ops2.hpp.
void plll::linalg::assign | ( | const implementation::expressions::expr< DestOp, DestData > & | destination, |
const implementation::expressions::expr< SourceOp, SourceData > & | source, | ||
helper::BoolToType< move > | ittm | ||
) |
Assigns the content of matrix source
to matrix destination
. Allows to force move.
source | Source matrix, whose contents are copied. |
destination | Destination matrix, where the contents of the source matrix are stored. |
ittm | Indicates whether a copy or move (if possible) should be executed. |
Definition at line 251 of file matrix-ops2.hpp.
|
inline |
Assigns the content of matrix source
to matrix destination
.
source | Source matrix, whose contents are copied. |
destination | Destination matrix, where the contents of the source matrix are stored. |
Definition at line 278 of file matrix-ops2.hpp.
|
inline |
Assigns the content of matrix source
to matrix destination
.
source | Source matrix, whose contents are copied. |
destination | Destination matrix, where the contents of the source matrix are stored. |
Definition at line 285 of file matrix-ops2.hpp.
|
inline |
Assigns the content of matrix source
to matrix destination
.
source | Source matrix, whose contents are copied. |
destination | Destination matrix, where the contents of the source matrix are stored. |
Definition at line 293 of file matrix-ops2.hpp.
|
inline |
Assigns the content of matrix source
to matrix destination
.
source | Source matrix, whose contents are copied. |
destination | Destination matrix, where the contents of the source matrix are stored. |
Definition at line 302 of file matrix-ops2.hpp.
|
inlinenoexcept |
Lexicographically compares the matrices A
and B
.
First compares rows and columns, and then all entries. The exact procedure is described in General Operations.
A | The first operand. |
B | The second operand. |
A < B
, zero if A == B
and a positive integer if A > B
. Definition at line 1736 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the componentwise division of A
with B
.
A | A matrix. |
B | A matrix. |
A
by B
. Definition at line 496 of file matrix-ops2.hpp.
|
noexcept |
Computes the componentwise division of A
by B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a matrix. |
Definition at line 744 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the componentwise modulo of A
with B
.
A | A matrix. |
B | A matrix. |
A
by B
. Definition at line 512 of file matrix-ops2.hpp.
|
noexcept |
Computes the componentwise modulo of A
by B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a matrix. |
Definition at line 759 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the componentwise multiplication of A
with B
.
A | A matrix. |
B | A matrix. |
A
and B
. Definition at line 480 of file matrix-ops2.hpp.
|
noexcept |
Computes the componentwise product of A
and B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a matrix. |
Definition at line 728 of file matrix-ops2.hpp.
arithmetic::Integer plll::linalg::det | ( | const math_matrix< arithmetic::Integer > & | A | ) |
Computes the determinant of an integer matrix A
.
It does this by first finding an upper bound on it, then computing the determinant modulo many small primes, and finally recovering the result using an effective version of the Chinese Remainder Theorem.
A | The matrix whose determinant should be computed. Must be square. |
|
noexcept |
Computes the componentwise division of A
by B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a scalar. |
Definition at line 697 of file matrix-ops2.hpp.
|
noexcept |
Computes the dot product of A
and B
and stores the result in result
.
What this does is componentwise multiplying A
and B
and then calling sum()
of the resulting matrix.
result | A scalar where to compute the result in. |
A | The first operand. |
B | The second operand. |
Definition at line 1223 of file matrix-ops2.hpp.
|
noexcept |
Computes the dot product of A
and B
and returns the result.
What this does is componentwise multiplying A
and B
and then calling sum()
of the resulting matrix.
A
and B
. A | The first operand. |
B | The second operand. |
Definition at line 1241 of file matrix-ops2.hpp.
unsigned plll::linalg::hnf | ( | math_matrix< arithmetic::Integer > & | A | ) |
Computes the Hermite Normal Form (HNF) of the given matrix A
by applying row operations.
The resulting HNF is an upper triangular matrix, with all zero rows moved to the bottom. Note that the matrix in A
is modified. The algorithm returns the rank of A
.
Implements the 1996 algorithm by Storjohann and Labahn [20].
A | The matrix to compute the HNF of. This matrix is modified. |
A
. unsigned plll::linalg::hnf | ( | math_matrix< arithmetic::Integer > & | A, |
math_matrix< arithmetic::Integer > & | T | ||
) |
Computes the Hermite Normal Form (HNF) of the given matrix A
by applying row operations, together with a transformation matrix T
.
The resulting HNF is an upper triangular matrix, with all zero rows moved to the bottom. Note that the matrices in A
and T
are modified. The algorithm returns the rank of A
, and the resulting T
satisfies .
Implements the 1996 algorithm by Storjohann and Labahn [20].
A | The matrix to compute the HNF of. This matrix is modified. |
T | The matrix where the transformation matrix is stored in. |
A
.
|
inline |
Creates an initializer object to initialize with the given reference.
S | The type of the object to initialize with. |
ref | The object to initialize with. |
Definition at line 123 of file matrix.hpp.
|
inlinenoexcept |
Creates an initializer object to default-initialize with type S
.
S | The type of the object to default-initialize with. |
Definition at line 135 of file matrix.hpp.
void plll::linalg::invert | ( | math_matrix< arithmetic::Integer > & | inverse, |
const math_matrix< arithmetic::Integer > & | A, | ||
const arithmetic::Integer & | startPrime = arithmetic::Integer() |
||
) |
Assumes that A
is invertible. Inverts the matrix A
and stores the result in inverse
.
In case no solution exists, the algorithm might not terminate. The algorithm uses p-adic methods by first finding a prime p
not dividing the determinant of A
. If special knowledge of the determinant is available, a prime not dividing it can be specified as the startPrime
parameter.
inverse | A matrix where the inverse is stored in. |
A | The matrix to invert. |
startPrime | The prime to start at. If given, should not be much less than a prime not dividing the determinant of A . |
math_matrix<arithmetic::Integer> plll::linalg::kernel | ( | const math_matrix< arithmetic::Integer > & | A | ) |
Computes a -basis of the right-kernel of A
.
The right-kernel of A
is the -module . A basis is a set of vectors from the kernel such that every vector in the kernel can be uniquely written as a linear combination of these vectors.
A | The matrix to compute the kernel of. |
A
.
|
noexcept |
Computes the componentwise modulo of A
by B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a scalar. |
Definition at line 712 of file matrix-ops2.hpp.
|
noexcept |
Computes the product of A
and B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. |
B | The second operand. |
Definition at line 681 of file matrix-ops2.hpp.
|
noexcept |
Computes the negation of A
and stores the result in result
.
result | The variable to store the result in. |
A | The operand. Must be a matrix. |
Definition at line 803 of file matrix-ops2.hpp.
|
noexcept |
Computes the squared norm of A
, i.e. the sum of the squares of all entries of A
, and stores the result in result
.
result | A scalar where to compute the result in. |
A | The matrix whose square norm to compute. |
Definition at line 1332 of file matrix-ops2.hpp.
|
noexcept |
Computes the squared norm of A
, i.e. the sum of the squares of all entries of A
, and returns the result.
A
. A | The matrix whose square norm to compute. |
Definition at line 1347 of file matrix-ops2.hpp.
|
inlinenoexcept |
Tests A
and B
for inequality.
A | The first operand. |
B | The second operand. |
false
if and only if A
and B
have the same format and the same entries. Definition at line 1820 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the componentwise modulo of A
with the scalar B
.
A | A matrix. |
B | A scalar. |
A
by B
. Definition at line 464 of file matrix-ops2.hpp.
|
inlinenoexcept |
Takes the current matrix modulo the scalar B
and stores the result in the current matrix.
A | The current matrix. |
B | The scalar to mod by. |
Definition at line 967 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the product of A
with B
.
A | A matrix. |
B | A matrix or scalar. |
A
and B
. Definition at line 416 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the product of A
with B
.
A | A scalar. |
B | A matrix. |
A
and B
. Definition at line 432 of file matrix-ops2.hpp.
|
inlinenoexcept |
Multiplies the current matrix with B
and stores the result in the current matrix.
A | The current matrix. |
B | The matrix or scalar to multiply with. |
Definition at line 934 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the sum of A
and B
.
A | A matrix. |
B | A matrix. |
A
and B
. Definition at line 528 of file matrix-ops2.hpp.
|
inlinenoexcept |
Adds B
to the current matrix.
A | The current matrix. |
B | The matrix to add to the current matrix. |
Definition at line 902 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the difference of A
and B
.
A | A matrix. |
B | A matrix. |
A
and B
. Definition at line 544 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the negation of A
.
A | A matrix. |
A
. Definition at line 559 of file matrix-ops2.hpp.
|
inlinenoexcept |
Subtracts B
from the current matrix.
A | The current matrix. |
B | The matrix to subtract from the current matrix. |
Definition at line 918 of file matrix-ops2.hpp.
|
inlinenoexcept |
Computes the componentwise division of A
with the scalar B
.
A | A matrix. |
B | A scalar. |
A
by B
. Definition at line 448 of file matrix-ops2.hpp.
|
inlinenoexcept |
Divides the current matrix by the scalar B
and stores the result in the current matrix.
A | The current matrix. |
B | The scalar to divide by. |
Definition at line 950 of file matrix-ops2.hpp.
|
inlinenoexcept |
Tests A
and B
lexicographically for A
being less than B
.
The exact procedure is described in General Operations.
A | The first operand. |
B | The second operand. |
true
if and only if lexicographically. Definition at line 1864 of file matrix-ops2.hpp.
|
inline |
Prints the given matrix mat
to the output stream s
.
s | An output stream. |
mat | The matrix to print. |
Definition at line 4175 of file matrix.hpp.
|
inline |
Prints the given matrix mat
to the output stream s
.
s | An output stream. |
mat | The matrix to print. |
Definition at line 4191 of file matrix.hpp.
|
inlinenoexcept |
Tests A
and B
lexicographically for A
being less than or equal to B
.
The exact procedure is described in General Operations.
A | The first operand. |
B | The second operand. |
true
if and only if lexicographically. Definition at line 1908 of file matrix-ops2.hpp.
|
inlinenoexcept |
Tests A
and B
for equality.
A | The first operand. |
B | The second operand. |
true
if and only if A
and B
have the same format and the same entries. Definition at line 1778 of file matrix-ops2.hpp.
|
inlinenoexcept |
Tests A
and B
lexicographically for A
being greater than B
.
The exact procedure is described in General Operations.
A | The first operand. |
B | The second operand. |
true
if and only if lexicographically. Definition at line 1952 of file matrix-ops2.hpp.
|
inlinenoexcept |
Tests A
and B
lexicographically for A
being greater than or equal to B
.
The exact procedure is described in General Operations.
A | The first operand. |
B | The second operand. |
true
if and only if lexicographically. Definition at line 1996 of file matrix-ops2.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
In case of an error, the std::ios_base::bad_bit
flag of s
is set.
s | An input stream. |
mat | Where to store the scanned matrix in. |
Definition at line 4519 of file matrix.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
In case of an error, the std::ios_base::bad_bit
flag of s
is set.
s | An input stream. |
mat | Where to store the scanned matrix in. |
Definition at line 4538 of file matrix.hpp.
|
inline |
Prints the given matrix mat
to the output stream s
.
forceGeneric | If true , always does the output in the mat<r,c>[...] format. If false , uses the vec<r>[...] format for column vectors. |
s | An output stream. |
mat | The matrix to print. |
Definition at line 4138 of file matrix.hpp.
|
inline |
Prints the given matrix mat
to the output stream s
.
s | An output stream. |
mat | The matrix to print. |
forceGeneric | If true , always does the output in the mat<r,c>[...] format. If false , uses the vec<r>[...] format for column vectors. The default value is false . |
Definition at line 4157 of file matrix.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
s | An input stream. |
mat | Where to store the scanned matrix in. |
true
if the matrix could be successfully read, or `false if an error occured.Definition at line 4439 of file matrix.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
s | An input stream. |
mat | Where to store the scanned matrix in. |
true
if the matrix could be successfully read, or `false if an error occured.Definition at line 4458 of file matrix.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
s | An input stream. |
mat | Where to store the scanned matrix in. |
default_object | The default object to use to initialize new elements. Could be a context. |
true
if the matrix could be successfully read, or false
if an error occured.Definition at line 4479 of file matrix.hpp.
|
inline |
Reads a matrix from the input stream s
and stores it in mat
.
s | An input stream. |
mat | Where to store the scanned matrix in. |
default_object | The default object to use to initialize new elements. Could be a context. |
true
if the matrix could be successfully read, or false
if an error occured.Definition at line 4500 of file matrix.hpp.
std::pair<math_colvector<arithmetic::Integer>, arithmetic::Integer> plll::linalg::solve | ( | const math_matrix< arithmetic::Integer > & | A, |
const math_colvector< arithmetic::Integer > & | b | ||
) |
Solves the linear system A * x == b
over the rationals.
Determines the minimal positive integer t
such that A * x == t * b
is solvable with an integral vector x
, and returns t
together with an arbitrary such solution x
; the quotient x/t
is then a "minimal" solution.
In case no solution exists, it returns a random vector together with the integer 0
.
A | The left-hand side of the linear equations. |
b | The right-hand side of the linear equations. |
(x, t)
such that A * x == t * b
with t > 0
minimal such that such an x
exists. math_colvector<arithmetic::Integer> plll::linalg::solveInt | ( | const math_matrix< arithmetic::Integer > & | A, |
const math_colvector< arithmetic::Integer > & | w | ||
) |
Assumes that the linear system A * v == w
has a solution in the integers. Finds this solution.
This algorithm essentially uses plll::linalg::solveUniqInt()
and might also not terminate in case no solution exists.
A | The left-hand side of the linear equations. |
w | The right-hand side of the linear equations. |
res
such that A * res == b
. math_matrix<arithmetic::Integer> plll::linalg::solveUniqInt | ( | const math_matrix< arithmetic::Integer > & | A, |
const math_matrix< arithmetic::Integer > & | w, | ||
const arithmetic::Integer & | startPrime = arithmetic::Integer() |
||
) |
Assumes that A
is a square matrix and that the equation A * res == w
has a unique solutions in the integers. Returns the.
Note that the assumption is the case if and only if det(A) != 0
. solution res
.
In case no solution exists, the algorithm might not terminate. The algorithm uses p-adic methods by first finding a prime p
not dividing the determinant of A
. If special knowledge of the determinant is available, a prime not dividing it can be specified as the startPrime
parameter.
Note that w
and thus also res
need not to be vectors, but can also be matrices with any number of columns.
A | The left-hand side of the linear equations. |
w | The right-hand side of the linear equations. |
startPrime | The prime to start at. If given, should not be much less than a prime not dividing the determinant of A . |
res
to A * res == w
.
|
noexcept |
Computes the difference of A
and B
and stores the result in result
.
result | The variable to store the result in. |
A | The first operand. Must be a matrix. |
B | The second operand. Must be a matrix. |
Definition at line 789 of file matrix-ops2.hpp.
void plll::linalg::submul | ( | base_matrix< T, Rows, Cols, ST, true > & | A, |
const T1 & | B, | ||
const T2 & | C | ||
) |
Computes A -= B * C
.
A | The variable to subtract the product from. |
B | The first operand of the product. |
C | The second operand of the product. |
Definition at line 1394 of file matrix-ops2.hpp.
|
noexcept |
Computes the sum of all entries of A
and stores the result in result
.
result | A scalar where to compute the result in. |
A | The matrix whose entries to sum up. |
Definition at line 1093 of file matrix-ops2.hpp.
|
noexcept |
Computes the sum of all entries of A
and returns the result.
A
. A | The matrix whose entries to sum up. |
Definition at line 1107 of file matrix-ops2.hpp.
void plll::linalg::swap | ( | base_matrix< T, R, C, ST, MO > & | A, |
base_matrix< T, R, C, ST, MO > & | B | ||
) |
Swaps matrices A
and B
efficiently.
A | First matrix. |
B | Second matrix. |
Definition at line 49 of file matrix-ops2.hpp.
void plll::linalg::swap | ( | base_matrix< T, R1, C1, ST, MO1 > & | A, |
base_matrix< T, R2, C2, ST, MO2 > & | B | ||
) |
Swaps matrices A
and B
efficiently.
A | First matrix. |
B | Second matrix. |
Definition at line 58 of file matrix-ops2.hpp.
|
noexcept |
Swaps matrices A
and B
componentwise.
A | First matrix. |
B | Second matrix. |
Definition at line 103 of file matrix-ops2.hpp.
|
noexcept |
Swaps matrices A
and B
componentwise.
A | First matrix. |
B | Second matrix. |
Definition at line 111 of file matrix-ops2.hpp.
|
noexcept |
Swaps matrices A
and B
componentwise.
A | First matrix. |
B | Second matrix. |
Definition at line 119 of file matrix-ops2.hpp.
|
noexcept |
Swaps matrices A
and B
componentwise.
A | First matrix. |
B | Second matrix. |
Definition at line 128 of file matrix-ops2.hpp.
|
inline |
Transposes the content of matrix source
and stores the result in the matrix destination
. Allows to force move.
source | Source matrix, whose contents are transposed copied. |
destination | Destination matrix, where the contents of the transposed source matrix are stored. |
ittm | Indicates whether a copy or move (if possible) should be executed. |
Definition at line 337 of file matrix-ops2.hpp.
|
inline |
Transposes the content of matrix source
and stores the result in the matrix destination
.
source | Source matrix, whose contents are transposed copied. |
destination | Destination matrix, where the contents of the transposed source matrix are stored. |
Definition at line 347 of file matrix-ops2.hpp.
|
inline |
Transposes the content of matrix source
and stores the result in the matrix destination
.
source | Source matrix, whose contents are transposed copied. |
destination | Destination matrix, where the contents of the transposed source matrix are stored. |
Definition at line 354 of file matrix-ops2.hpp.
|
inline |
Transposes the content of matrix source
and stores the result in the matrix destination
.
source | Source matrix, whose contents are transposed copied. |
destination | Destination matrix, where the contents of the transposed source matrix are stored. |
Definition at line 362 of file matrix-ops2.hpp.
|
inline |
Transposes the content of matrix source
and stores the result in the matrix destination
.
source | Source matrix, whose contents are transposed copied. |
destination | Destination matrix, where the contents of the transposed source matrix are stored. |
Definition at line 371 of file matrix-ops2.hpp.