sgdk::DenseMatrix<> Class Template Reference
[ZRef Module]

#include <swiss_gd_knife/zref/matrix.hpp>

List of all members.


Detailed Description

template<>
class sgdk::DenseMatrix<>

Swiss GD Knife's reference implementation of a dense matrix. It should be used only to verify the correctness of the main algorithms and classes provided by Swiss GD Knife that are built on top of dense matrices. For better performance, use a Boost.uBLAS matrix, a NURBS++ matrix, or any other source-compatible matrix class.


Template parameters

Parameter Description Default
Value The type of object that is stored in the dense matrix.
Size The type of the arguments passed to DenseMatrix() and resize(). unsigned int


Model of


Type requirements



Public Types

typedef Value value_type
typedef implementation_defined reference
typedef implementation_defined const_reference

Public Member Functions

 DenseMatrix (const Size row_count=2, const Size column_count=2)
 The default constructor.
 DenseMatrix (const DenseMatrix &copy)
 The copy constructor.
DenseMatrixoperator= (const DenseMatrix &copy)
 The assignment operator.
reference operator() (const Size row, const Size column)
const_reference operator() (const Size row, const Size column) const
void resize (const Size row_count, const Size column_count)


Member Typedef Documentation

typedef Value sgdk::DenseMatrix<>::value_type
 

The dense matrix's value type.

typedef implementation_defined sgdk::DenseMatrix<>::reference
 

A type that behaves as a mutable reference to the dense matrix's value type.

typedef implementation_defined sgdk::DenseMatrix<>::const_reference
 

A type that behaves as a const reference to the dense matrix's value type.


Constructor & Destructor Documentation

sgdk::DenseMatrix<>::DenseMatrix const Size  row_count = 2,
const Size  column_count = 2
[inline]
 

Constructs a new DenseMatrix with the specified dimensions.

Parameters:
row_count the size of the first dimension.
column_count the size of the second dimension.

sgdk::DenseMatrix<>::DenseMatrix const DenseMatrix<> &  copy  )  [inline]
 

Constructs a new DenseMatrix that will be internally equivalent to the copy at this point in time.

Parameters:
copy the DenseMatrix being copied.


Member Function Documentation

DenseMatrix& sgdk::DenseMatrix<>::operator= const DenseMatrix<> &  copy  )  [inline]
 

Sets this DenseMatrix to be internally equivalent to the copy.

Parameters:
copy the DenseMatrix being copied.
Returns:
a reference to this DenseMatrix.

reference sgdk::DenseMatrix<>::operator() const Size  row,
const Size  column
[inline]
 

Returns a mutable reference to the element at the specified location in this DenseMatrix.

Parameters:
row the first-dimension coordinate containing the desired element.
column the second-dimension coordinate containing the desired element.
Precondition:
0 <= row < row_count

0 <= column < column_count

Returns:
a mutable reference to the desired element.

const_reference sgdk::DenseMatrix<>::operator() const Size  row,
const Size  column
const [inline]
 

Returns a const reference to the element at the specified location in this DenseMatrix.

Parameters:
row the first-dimension coordinate containing the desired element.
column the second-dimension coordinate containing the desired element.
Precondition:
0 <= row < row_count

0 <= column < column_count

Returns:
a const reference to the desired element.

void sgdk::DenseMatrix<>::resize const Size  row_count,
const Size  column_count
 

Sets this DenseMatrix to the specified dimensions. Zeroes all elements.

Parameters:
row_count the new size of the first dimension.
column_count the new size of the second dimension.


Swiss GD Knife is hosted by SourceForge.net.