![]() |
libsemigroups
v3.0.0
C++ library for semigroups and monoids
|
This page contains documentation related to safely constructing a Matrix instance.
Functions | |
template<typename Mat, typename Semiring, typename = std::enable_if_t<IsMatrix<Mat>>> | |
Mat | make (Semiring const *semiring, std::initializer_list< std::initializer_list< typename Mat::scalar_type > > const &rows) |
Constructs a matrix (from std::initializer_list) and checks it. | |
template<typename Mat, typename Semiring, typename = std::enable_if_t<IsMatrix<Mat>>> | |
Mat | make (Semiring const *semiring, std::initializer_list< typename Mat::scalar_type > const &row) |
Constructs a row and checks it. | |
template<typename Mat, typename Semiring, typename = std::enable_if_t<IsMatrix<Mat>>> | |
Mat | make (Semiring const *semiring, std::vector< std::vector< typename Mat::scalar_type > > const &rows) |
Constructs a matrix (from std::vector of std::vector) and checks it. | |
template<size_t R, size_t C, typename Scalar> | |
ProjMaxPlusMat< R, C, Scalar > | make (std::initializer_list< std::initializer_list< Scalar > > const &rows) |
Constructs a projective max-plus matrix (from std::initializer_list) and checks it. | |
template<typename Mat, typename = std::enable_if_t<IsMatrix<Mat> && !IsMatWithSemiring<Mat>>> | |
Mat | make (std::initializer_list< std::vector< typename Mat::scalar_type > > const &rows) |
Checks the arguments, constructs a matrix, and checks it. | |
template<typename Mat, typename = std::enable_if_t<IsMatrix<Mat> && !IsMatWithSemiring<Mat>>> | |
Mat | make (std::initializer_list< typename Mat::scalar_type > const &row) |
Constructs a row and checks it. | |
template<typename Mat, typename = std::enable_if_t<IsMatrix<Mat> && !IsMatWithSemiring<Mat>>> | |
Mat | make (std::vector< std::vector< typename Mat::scalar_type > > const &rows) |
Checks the arguments, constructs a matrix, and checks it. | |
Mat make | ( | Semiring const * | semiring, |
std::initializer_list< std::initializer_list< typename Mat::scalar_type > > const & | rows ) |
Defined in matrix.hpp
.
Checks the arguments, constructs a matrix and checks it.
Mat | the type of the matrix being constructed (must satisfy IsMatrix<Mat>). |
Semiring | the type of the semiring where arithmetic is performed. |
semiring | a pointer to const semiring object. |
rows | the values to be copied into the matrix. |
LibsemigroupsException | if rows does not represent a matrix of the correct dimensions. |
LibsemigroupsException | if the constructed matrix contains values that do not belong to the underlying semiring. |
Mat make | ( | Semiring const * | semiring, |
std::initializer_list< typename Mat::scalar_type > const & | row ) |
Defined in matrix.hpp
.
This function constructs a row and checks it.
Semiring | the type of the semiring where arithmetic is performed. |
semiring | a pointer to const semiring object. |
row | the values to be copied into the row. |
LibsemigroupsException | if the constructed row contains values that do not belong to the underlying semiring. |
Mat make | ( | Semiring const * | semiring, |
std::vector< std::vector< typename Mat::scalar_type > > const & | rows ) |
Defined in matrix.hpp
.
Checks the arguments, constructs a matrix, and checks it.
Mat | the type of the matrix being constructed (must satisfy IsMatrix). |
Semiring | the type of the semiring where arithmetic is performed. |
semiring | a pointer to const semiring object. |
rows | the rows to be copied into the matrix. |
LibsemigroupsException | if rows does not represent a matrix of the correct dimensions. |
LibsemigroupsException | if the constructed matrix contains values that do not belong to the underlying semiring. |
ProjMaxPlusMat< R, C, Scalar > make | ( | std::initializer_list< std::initializer_list< Scalar > > const & | rows | ) |
Defined in matrix.hpp
.
Checks the arguments, constructs a matrix, and checks it.
Mat | the type of the matrix being constructed (must satisfy IsProjMaxPlusMat<Mat>). |
rows | the values to be copied into the matrix. |
LibsemigroupsException | if rows does not represent a matrix of the correct dimensions. |
LibsemigroupsException | if the constructed matrix contains values that do not belong to the underlying semiring. |
Mat make | ( | std::initializer_list< std::vector< typename Mat::scalar_type > > const & | rows | ) |
Defined in matrix.hpp
.
Checks the arguments, constructs a matrix, and checks it.
Mat | the type of matrix being constructed, must satisfy IsMatrix<Mat> and not IsMatWithSemiring<Mat>. |
rows | the values to be copied into the matrix. |
LibsemigroupsException | if rows does not represent a matrix of the correct dimensions. |
LibsemigroupsException | if the constructed matrix contains values that do not belong to the underlying semiring. |
Mat make | ( | std::initializer_list< typename Mat::scalar_type > const & | row | ) |
Defined in matrix.hpp
.
This function constructs a row from a std::initializer_list and then calls throw_if_bad_entry.
Mat | the type of matrix being constructed, must satisfy IsMatrix<Mat> and not IsMatWithSemiring<Mat>. |
row | the values to be copied into the row. |
LibsemigroupsException | if the constructed row contains values that do not belong to the underlying semiring. |
R
is 1
. Mat make | ( | std::vector< std::vector< typename Mat::scalar_type > > const & | rows | ) |
Defined in matrix.hpp
.
Checks the arguments, constructs a matrix, and checks it.
Mat | the type of matrix being constructed, must satisfy IsMatrix<Mat> and not IsMatWithSemiring<Mat>. |
rows | the values to be copied into the matrix. |
LibsemigroupsException | if rows does not represent a matrix of the correct dimensions. |
LibsemigroupsException | if the constructed matrix contains values that do not belong to the underlying semiring. |