MatrixModel Class Reference

#include <MatrixModel.h>

List of all members.

Public Member Functions

bool calculate (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1)
bool canResize (int rows, int cols)
double cell (int row, int col)
void clear (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1)
int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
double data (int row, int col) const
double * dataCopy (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1)
double * dataVector ()
void fft (bool inverse)
Qt::ItemFlags flags (const QModelIndex &index) const
void flipHorizontally ()
void flipVertically ()
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool importASCII (const QString &fname, const QString &sep, int ignoredLines, bool stripSpaces, bool simplifySpaces, const QString &commentString, int importAs, const QLocale &locale, int endLineChar=0, int maxRows=-1)
bool initWorkspace ()
bool insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
void invert ()
Matrixmatrix ()
 MatrixModel (const QImage &image, QObject *parent)
 MatrixModel (int rows=32, int cols=32, QObject *parent=0)
bool muParserCalculate (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1)
void pasteData (double *clipboardBuffer, int topRow, int leftCol, int rows, int cols)
bool removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
QImage renderImage ()
void rotate90 (bool clockwise)
int rowCount (const QModelIndex &parent=QModelIndex()) const
QString saveToString ()
void setCell (int row, int col, double val)
void setColumnCount (int cols)
bool setData (const QModelIndex &index, const QVariant &value, int role)
void setDimensions (int rows, int cols)
void setImage (const QImage &image)
void setLocale (const QLocale &locale)
void setNumericFormat (char f, int prec)
void setRowCount (int rows)
void setText (int row, int col, const QString &)
QString text (int row, int col)
void transpose ()
double x (int col) const
double y (int row) const
 ~MatrixModel ()

Private Member Functions

void init ()

Private Attributes

int d_cols
double * d_data
QSize d_data_block_size
gsl_matrix * d_direct_matrix
 Pointers to GSL matrices used during inversion operations.
gsl_matrix * d_inv_matrix
gsl_permutation * d_inv_perm
 Pointer to a GSL permutation used during inversion operations.
QLocale d_locale
 Locale used to display data.
Matrixd_matrix
int d_num_precision
 Number of significant digits.
int d_rows
char d_txt_format
 Format code for displaying numbers.

Constructor & Destructor Documentation

MatrixModel::MatrixModel ( int  rows = 32,
int  cols = 32,
QObject *  parent = 0 
)
MatrixModel::MatrixModel ( const QImage &  image,
QObject *  parent 
)

References init(), and setImage().

MatrixModel::~MatrixModel (  )  [inline]

References d_data.


Member Function Documentation

bool MatrixModel::calculate ( int  startRow = 0,
int  endRow = -1,
int  startCol = 0,
int  endCol = -1 
)
bool MatrixModel::canResize ( int  rows,
int  cols 
)
double MatrixModel::cell ( int  row,
int  col 
)
void MatrixModel::clear ( int  startRow = 0,
int  endRow = -1,
int  startCol = 0,
int  endCol = -1 
)
int MatrixModel::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const
QVariant MatrixModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
double MatrixModel::data ( int  row,
int  col 
) const
double * MatrixModel::dataCopy ( int  startRow = 0,
int  endRow = -1,
int  startCol = 0,
int  endCol = -1 
)
double* MatrixModel::dataVector (  )  [inline]
void MatrixModel::fft ( bool  inverse  ) 
Qt::ItemFlags MatrixModel::flags ( const QModelIndex &  index  )  const
void MatrixModel::flipHorizontally (  ) 
void MatrixModel::flipVertically (  ) 
QVariant MatrixModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
bool MatrixModel::importASCII ( const QString &  fname,
const QString &  sep,
int  ignoredLines,
bool  stripSpaces,
bool  simplifySpaces,
const QString &  commentString,
int  importAs,
const QLocale &  locale,
int  endLineChar = 0,
int  maxRows = -1 
)
void MatrixModel::init (  )  [private]
bool MatrixModel::initWorkspace (  ) 
bool MatrixModel::insertColumns ( int  column,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
bool MatrixModel::insertRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
void MatrixModel::invert (  ) 
Matrix* MatrixModel::matrix (  )  [inline]
bool MatrixModel::muParserCalculate ( int  startRow = 0,
int  endRow = -1,
int  startCol = 0,
int  endCol = -1 
)
void MatrixModel::pasteData ( double *  clipboardBuffer,
int  topRow,
int  leftCol,
int  rows,
int  cols 
)
bool MatrixModel::removeColumns ( int  column,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
bool MatrixModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
QImage MatrixModel::renderImage (  ) 
void MatrixModel::rotate90 ( bool  clockwise  ) 
int MatrixModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const
QString MatrixModel::saveToString (  ) 

References d_cols, d_data, and d_rows.

Referenced by Matrix::save().

void MatrixModel::setCell ( int  row,
int  col,
double  val 
)
void MatrixModel::setColumnCount ( int  cols  ) 
bool MatrixModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
void MatrixModel::setDimensions ( int  rows,
int  cols 
)
void MatrixModel::setImage ( const QImage &  image  ) 
void MatrixModel::setLocale ( const QLocale &  locale  )  [inline]

References d_locale.

Referenced by PreviewMatrix::PreviewMatrix().

void MatrixModel::setNumericFormat ( char  f,
int  prec 
)
void MatrixModel::setRowCount ( int  rows  ) 
void MatrixModel::setText ( int  row,
int  col,
const QString &  text 
)

References d_cols, d_data, d_locale, d_matrix, and d_rows.

Referenced by importASCII(), and Matrix::setText().

QString MatrixModel::text ( int  row,
int  col 
)
void MatrixModel::transpose (  ) 
double MatrixModel::x ( int  col  )  const
double MatrixModel::y ( int  row  )  const

Member Data Documentation

int MatrixModel::d_cols [private]
double* MatrixModel::d_data [private]
gsl_matrix* MatrixModel::d_direct_matrix [private]

Pointers to GSL matrices used during inversion operations.

Referenced by init(), initWorkspace(), and invert().

gsl_matrix * MatrixModel::d_inv_matrix [private]

Referenced by init(), initWorkspace(), and invert().

gsl_permutation* MatrixModel::d_inv_perm [private]

Pointer to a GSL permutation used during inversion operations.

Referenced by init(), initWorkspace(), and invert().

QLocale MatrixModel::d_locale [private]

Locale used to display data.

Referenced by data(), headerData(), importASCII(), init(), MatrixModel(), setLocale(), setText(), and text().

Number of significant digits.

Referenced by data(), headerData(), init(), MatrixModel(), setNumericFormat(), and text().

int MatrixModel::d_rows [private]
char MatrixModel::d_txt_format [private]

Format code for displaying numbers.

Referenced by data(), headerData(), init(), MatrixModel(), setNumericFormat(), and text().


The documentation for this class was generated from the following files:

Generated on Tue Nov 3 10:48:56 2009 for QtiPlot by  doxygen 1.6.1