CMS 3D CMS Logo

Public Member Functions

hitfit::Row_Vector Class Reference

Row-vector class. CLHEP doesn't have a row-vector class, so HitFit uses its own. This is only a simple wrapper around Matrix that tries to constrain the shape to a row vector. It will raise an assertion if you try to assign to it something that isn't a row vector. More...

#include <matutil.h>

List of all members.

Public Member Functions

const double & operator() (int col) const
 Direct element access, indexing starts from 1.
double & operator() (int col)
 Direct element access, indexing starts from 1.
double & operator() (int row, int col)
 Direct element access, indexing starts from (1,1).
const double & operator() (int row, int col) const
 Direct element access, indexing starts from (1,1).
Row_Vectoroperator= (const Matrix &m)
 Assignment operator, will raise an assertion if m doesn't have exactly one row.
 Row_Vector (int cols, int init)
 Constructor, instantiate an unitialized $1 \times \mathrm{cols}$ matrix, and initialized it to zero.
 Row_Vector (const Matrix &m)
 Copy constructor, will raise an assertion if m doesn't have exactly one row.
 Row_Vector (int cols)
 Constructor, instantiate an unitialized $1 \times \mathrm{cols}$ matrix.

Detailed Description

Row-vector class. CLHEP doesn't have a row-vector class, so HitFit uses its own. This is only a simple wrapper around Matrix that tries to constrain the shape to a row vector. It will raise an assertion if you try to assign to it something that isn't a row vector.

Definition at line 84 of file matutil.h.


Constructor & Destructor Documentation

hitfit::Row_Vector::Row_Vector ( int  cols) [explicit]

Constructor, instantiate an unitialized $1 \times \mathrm{cols}$ matrix.

Parameters:
colsThe number of columns (the length of the vector).

Definition at line 45 of file matutil.cc.

  : Matrix (1, cols)
{
}
hitfit::Row_Vector::Row_Vector ( int  cols,
int  init 
) [explicit]

Constructor, instantiate an unitialized $1 \times \mathrm{cols}$ matrix, and initialized it to zero.

Parameters:
colsThe number of columns (the length of the vector).
initA dummy argument, should always be zero.

Definition at line 58 of file matutil.cc.

  : Matrix (1, cols, 0)
{
}
hitfit::Row_Vector::Row_Vector ( const Matrix m)

Copy constructor, will raise an assertion if m doesn't have exactly one row.

Parameters:
mThe matrix to copy, must have exactly one row.

Definition at line 72 of file matutil.cc.

  : Matrix (m)
{
  assert (m.num_row() == 1);
}

Member Function Documentation

const double & hitfit::Row_Vector::operator() ( int  col) const

Direct element access, indexing starts from 1.

Parameters:
colThe column to access.

Definition at line 87 of file matutil.cc.

Referenced by operator()().

{
  return HepMatrix::operator() (1, col);
}
double & hitfit::Row_Vector::operator() ( int  col)

Direct element access, indexing starts from 1.

Parameters:
colThe column to access.

Definition at line 102 of file matutil.cc.

References operator()().

{
  return HepMatrix::operator() (1, col);
}
double & hitfit::Row_Vector::operator() ( int  row,
int  col 
)

Direct element access, indexing starts from (1,1).

Parameters:
rowThe row to access.
colThe column to access.

Definition at line 133 of file matutil.cc.

References operator()().

{
  return HepMatrix::operator() (row, col);
}
const double & hitfit::Row_Vector::operator() ( int  row,
int  col 
) const

Direct element access, indexing starts from (1,1).

Parameters:
rowThe row to access.
colThe column to access.

Definition at line 117 of file matutil.cc.

{
  return HepMatrix::operator() (row, col);
}
Row_Vector & hitfit::Row_Vector::operator= ( const Matrix m)

Assignment operator, will raise an assertion if m doesn't have exactly one row.

Parameters:
mThe matrix to copy, must have exactly one row.

Definition at line 149 of file matutil.cc.

References m.

{
  assert (m.num_row() == 1);
  *((Matrix*)this) = m;
  return *this;
}