Template Class DenseMatrix

Class Documentation

template<typename RealT, typename IdxT>
class DenseMatrix

Public Functions

DenseMatrix(const IdxT rows_size, const IdxT columns_size)

DenseMatrix constructor.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Parameters:
  • IdxT[in] - rows_size

  • IdxT[in] - columns_size

~DenseMatrix()

DenseMatrix destructor.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

inline RealT getValue(const IdxT i, const IdxT j) const

DenseMatrix single value getter.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Parameters:
  • IdxT[in] - i row index

  • IdxT[in] - j column index

Returns:

RealT - value

inline void setValue(const IdxT i, const IdxT j, const RealT value)

DenseMatrix single value setter.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Parameters:
  • IdxT[in] - i row index

  • IdxT[in] - j column index

  • RealT[in] - value

inline void setValues(COO_Matrix<RealT, IdxT> values_COO)

DenseMatrix value setter from COO.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Parameters:

COO_Matrix<RealT, IdxT>[in] - values_COO

void setValues(size_t nnz, const IdxT *rows_coo, const IdxT *cols_coo, const RealT *vals_coo)

DenseMatrix value setter from individual COO arrays. Calls setValue() for each input.

Parameters:
  • nnz – Size of array inputs

  • rows_coo – Row indices

  • cols_coo – Column indices

  • vals_coo – Values

inline std::vector<RealT> *getValues()

DenseMatrix getter for all values stored as a vector.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Returns:

Address of the vector containing matrix values

inline COO_Matrix<RealT, IdxT> *getValuesCOO()

DenseMatrix getter for all values stored as a COO sparse matrix.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Returns:

Address of the COO matrix containing the sparsified matrix values

inline void toCOO()

Dense matrix conversion to COO form.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

inline void printMatrix(std::string name = "")

Print matrix.

Template Parameters:
  • RealT – - Real type for Jacobian entries

  • IdxT – - Integer data type for matrix indices

Parameters:

name[in] to identify the specific matrix printed