19 static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
20 #define NAN (*(const float *) __nan)
35 DenseMatrix(
unsigned int rows = 0,
unsigned int cols = 1,
double value = NAN);
46 double& operator()(
unsigned int row,
unsigned int col = 0);
48 double operator()(
unsigned int row,
unsigned int col = 0)
const;
93 double determinant()
const;
117 friend std::ostream& operator<<(std::ostream& os,
const DenseMatrix& A);
120 const double *getData()
const;
122 unsigned int getRows()
const;
124 unsigned int getColumns()
const;
135 void multiply(
bool transposeA,
bool transposeB,
double alpha,
double beta,
const DenseMatrix& B,
DenseMatrix& C);
140 double length()
const;
153 void fill(
double value);
154 void set(
float *data);
155 void set(
double *data);
156 void get(
double *outData)
const;
157 void get(
float *outData)
const;
166 cholmod_dense *dense;
173 inline double& DenseMatrix::operator()(
unsigned int row,
unsigned int col)
177 assert(row < nrow && col < ncol);
179 return ((
double*)dense->x)[col*nrow + row];
182 inline double DenseMatrix::operator()(
unsigned int row,
unsigned int col)
const
186 assert(row < nrow && col < ncol);
188 return ((
double*)dense->x)[col*nrow + row];
191 inline double *DenseMatrix::getData(){
return (
double *)(dense->x); };
192 inline const double *DenseMatrix::getData()
const {
return (
double *)(dense->x); };
194 inline unsigned int DenseMatrix::getRows()
const{
return nrow; }
196 inline unsigned int DenseMatrix::getColumns()
const{
return ncol; }
Definition: dense_matrix.h:31
double norm(int norm) const
Definition: dense_matrix.cpp:120
Definition: sparse_matrix.h:62