PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE > Class Template Reference

#include <SignMatrix.h>

List of all members.

Classes

struct  intColHdr
struct  intRowHdr

Public Member Functions

 SignMatrix (unsigned int rows=0, unsigned int cols=0, unsigned int maxR=16, unsigned int maxC=16)
virtual ~SignMatrix ()
unsigned int getNumRows () const
unsigned int getNumCols () const
Row getRow (unsigned int rowNo) const
unsigned int getRowNumber (Row row) const
Col getCol (unsigned int colNo) const
unsigned int getColNumber (Col col) const
Sign operator() (unsigned int rowNo, unsigned int colNo) const
Sign operator() (Row row, Col col) const
Sign operator() (Row row, unsigned int colNo) const
Sign operator() (unsigned int rowNo, Col col) const
void setEntry (unsigned int rowNo, unsigned int colNo, Sign val)
void setEntry (Row row, Col col, Sign val)
void setEntry (Row row, unsigned int colNo, Sign val)
void setEntry (unsigned int rowNo, Col col, Sign val)
RowHdr & rowHdr (unsigned int rowNo)
RowHdr & rowHdr (Row col)
ColHdr & colHdr (unsigned int colNo)
ColHdr & colHdr (Col col)
bool columnsEqual (Col col1, Col col2)
Col insertZeroCol (unsigned int colNo, ColHdr colHdr=ColHdr())
Col insertUnitCol (unsigned int colNo, unsigned int i, ColHdr colHdr=ColHdr())
Col insertInvCol (Col sourceCol, unsigned int targetColNo, ColHdr targetColHdr=ColHdr())
Col insertColSum (Col sourceCol1, Col sourceCol2, unsigned int targetColNo, ColHdr targetColHdr=ColHdr())
Col insertColCopy (Col sourceCol, unsigned int targetColNo)
Col insertIntersectionCol (Col sourceCol1, Col sourceCol2, unsigned int targetColNo, ColHdr targetColHdr=ColHdr())
void addToCol (Col sourceCol, Col targetCol)
void deleteCol (Col col)
void moveCol (Col col, unsigned int newColNo)
Row insertZeroRow (unsigned int rowNo, RowHdr rowHdr=RowHdr())
Row insertRowCopy (Row sourceRow, unsigned int targetRowNo)
void deleteRow (Row row)
void moveRow (Row row, unsigned int newRowNo)
void clone (const SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE > &mat, std::list< Col > &colList)
void insertMatrix (const SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE > &mat, unsigned int rowOffset, unsigned int colOffset)
void printMatrix (std::ostream &os=std::cout) const

Private Member Functions

void extend (unsigned int rows, unsigned int cols)
Row insertRow (unsigned int rowNo, RowHdr rowHdr)
Col insertCol (unsigned int colNo, ColHdr colHdr)
void free ()

Private Attributes

unsigned int numRows
unsigned int numCols
unsigned int maxNumRows
unsigned int maxNumCols
int firstUnusedRow
int firstUnusedCol
INTERNAL_TYPE * matrix
std::vector< intRowHdrrowHdrs
std::vector< intColHdrcolHdrs
const unsigned int INTERNAL_SIZE
INTERNAL_TYPE mask1
INTERNAL_TYPE mask2

Static Private Attributes

static const double EXTEND_CONDITION = 1.2
static const double EXTEND_FACTOR = 2.0

Detailed Description

template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
class PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >

Definition at line 30 of file SignMatrix.h.


Constructor & Destructor Documentation

template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::SignMatrix ( unsigned int  rows = 0,
unsigned int  cols = 0,
unsigned int  maxR = 16,
unsigned int  maxC = 16 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::~SignMatrix (  )  [inline, virtual]

Destructor

Destroys the instance and deallocates any used memory.

Definition at line 185 of file SignMatrix.h.

References PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::free().


Member Function Documentation

template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::addToCol ( Col  sourceCol,
Col  targetCol 
) [inline]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::clone ( const SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE > &  mat,
std::list< Col > &  colList 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
ColHdr & PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::colHdr ( Col  col  )  [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
ColHdr & PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::colHdr ( unsigned int  colNo  )  [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
bool PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::columnsEqual ( Col  col1,
Col  col2 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::deleteCol ( Col  col  )  [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::deleteRow ( Row  row  )  [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::extend ( unsigned int  rows,
unsigned int  cols 
) [inline, private]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::free (  )  [inline, private]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getCol ( unsigned int  colNo  )  const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getColNumber ( Col  col  )  const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getNumCols (  )  const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getNumRows (  )  const [inline]

Methods for getting the size of the matrix.

Definition at line 212 of file SignMatrix.h.

References PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::numRows.

template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Row PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getRow ( unsigned int  rowNo  )  const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getRowNumber ( Row  row  )  const [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertCol ( unsigned int  colNo,
ColHdr  colHdr 
) [inline, private]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertColCopy ( Col  sourceCol,
unsigned int  targetColNo 
) [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertColSum ( Col  sourceCol1,
Col  sourceCol2,
unsigned int  targetColNo,
ColHdr  targetColHdr = ColHdr() 
) [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertIntersectionCol ( Col  sourceCol1,
Col  sourceCol2,
unsigned int  targetColNo,
ColHdr  targetColHdr = ColHdr() 
) [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertInvCol ( Col  sourceCol,
unsigned int  targetColNo,
ColHdr  targetColHdr = ColHdr() 
) [inline]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertMatrix ( const SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE > &  mat,
unsigned int  rowOffset,
unsigned int  colOffset 
) [inline]
template<class RowHdr, class ColHdr , typename INTERNAL_TYPE >
Row PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertRow ( unsigned int  rowNo,
RowHdr  rowHdr 
) [inline, private]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Row PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertRowCopy ( Row  sourceRow,
unsigned int  targetRowNo 
) [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertUnitCol ( unsigned int  colNo,
unsigned int  i,
ColHdr  colHdr = ColHdr() 
) [inline]
template<class RowHdr , class ColHdr, typename INTERNAL_TYPE >
Col PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertZeroCol ( unsigned int  colNo,
ColHdr  colHdr = ColHdr() 
) [inline]

Writes zeros to a given column. If the column with the specified index does not yet exist, it is created. Returns the changed or newly created column.

Definition at line 374 of file SignMatrix.h.

References PC::Col::colid, PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::INTERNAL_SIZE, PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::matrix, and PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::maxNumRows.

Referenced by PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertMatrix().

template<class RowHdr, class ColHdr , typename INTERNAL_TYPE >
Row PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertZeroRow ( unsigned int  rowNo,
RowHdr  rowHdr = RowHdr() 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::moveCol ( Col  col,
unsigned int  newColNo 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::moveRow ( Row  row,
unsigned int  newRowNo 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Sign PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::operator() ( unsigned int  rowNo,
Col  col 
) const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Sign PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::operator() ( Row  row,
unsigned int  colNo 
) const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Sign PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::operator() ( Row  row,
Col  col 
) const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
Sign PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::operator() ( unsigned int  rowNo,
unsigned int  colNo 
) const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::printMatrix ( std::ostream &  os = std::cout  )  const [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
RowHdr & PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::rowHdr ( Row  col  )  [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
RowHdr & PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::rowHdr ( unsigned int  rowNo  )  [inline]

Operators giving access to the headers of the matrix. Index bounds are checked in debug mode only.

Definition at line 313 of file SignMatrix.h.

References PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getRow(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::numRows, and PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::rowHdrs.

template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::setEntry ( unsigned int  rowNo,
Col  col,
Sign  val 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::setEntry ( Row  row,
unsigned int  colNo,
Sign  val 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::setEntry ( Row  row,
Col  col,
Sign  val 
) [inline]
template<class RowHdr , class ColHdr , typename INTERNAL_TYPE >
void PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::setEntry ( unsigned int  rowNo,
unsigned int  colNo,
Sign  val 
) [inline]

Member Data Documentation

template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
std::vector<intColHdr> PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::colHdrs [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
const double PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::EXTEND_CONDITION = 1.2 [static, private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
const double PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::EXTEND_FACTOR = 2.0 [static, private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::firstUnusedCol [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::firstUnusedRow [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
const unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::INTERNAL_SIZE [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
INTERNAL_TYPE PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::mask1 [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
INTERNAL_TYPE PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::mask2 [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
INTERNAL_TYPE* PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::matrix [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::maxNumCols [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::maxNumRows [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::numCols [private]

Definition at line 33 of file SignMatrix.h.

Referenced by PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::addToCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::clone(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::colHdr(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::columnsEqual(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::deleteCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::extend(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::free(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getColNumber(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::getNumCols(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertColCopy(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertColSum(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertIntersectionCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertInvCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertMatrix(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertRow(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertRowCopy(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::insertZeroRow(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::moveCol(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::operator()(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::printMatrix(), PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::setEntry(), and PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::SignMatrix().

template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
unsigned int PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::numRows [private]
template<class RowHdr, class ColHdr, typename INTERNAL_TYPE>
std::vector<intRowHdr> PC::SignMatrix< RowHdr, ColHdr, INTERNAL_TYPE >::rowHdrs [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:54 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1