QuickRank  v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
Public Member Functions | Private Attributes | List of all members
SymMatrix< T > Class Template Reference

#include <symmatrix.h>

Public Member Functions

 SymMatrix (size_t size)
 default constructor: allocate an array of size size*(size+1)/2. More...
 
 ~SymMatrix ()
 
T & at (const size_t i, const size_t j)
 return the element at position ( i, j ) for left-hand operation. More...
 
at (const size_t i, const size_t j) const
 return the element at position ( i, j ) for right-hand operation. More...
 
T & at (const size_t i)
 return the element at position i of the array representing the matrix for left-hand operation. More...
 
at (const size_t i) const
 return the element at position i of the array representing the matrix for right-hand operation. More...
 
T * vectat (const size_t i, const size_t j)
 return the pointer to the element at position ( i, j ) of the array representing the matrix. More...
 
size_t get_size () const
 return matrix size. More...
 

Private Attributes

T * data
 
size_t size
 

Constructor & Destructor Documentation

template<typename T >
SymMatrix< T >::SymMatrix ( size_t  size)
inline

default constructor: allocate an array of size size*(size+1)/2.

Parameters
sizeorder of the matrix.
template<typename T >
SymMatrix< T >::~SymMatrix ( )
inline

Member Function Documentation

template<typename T >
T& SymMatrix< T >::at ( const size_t  i,
const size_t  j 
)
inline

return the element at position ( i, j ) for left-hand operation.

Parameters
irow in [0 .. size -1]
jcolumn in [0 .. size -1]
template<typename T >
T SymMatrix< T >::at ( const size_t  i,
const size_t  j 
) const
inline

return the element at position ( i, j ) for right-hand operation.

Parameters
irow in [0 .. size -1]
jcolumn in [0 .. size -1]
template<typename T >
T& SymMatrix< T >::at ( const size_t  i)
inline

return the element at position i of the array representing the matrix for left-hand operation.

Parameters
iindex in [0 .. size -1]
template<typename T >
T SymMatrix< T >::at ( const size_t  i) const
inline

return the element at position i of the array representing the matrix for right-hand operation.

Parameters
iindex in [0 .. size -1]
template<typename T >
size_t SymMatrix< T >::get_size ( ) const
inline

return matrix size.

template<typename T >
T* SymMatrix< T >::vectat ( const size_t  i,
const size_t  j 
)
inline

return the pointer to the element at position ( i, j ) of the array representing the matrix.

Parameters
irow in [0 .. size -1]
jcolumn in [0 .. size -1]

Member Data Documentation

template<typename T >
T* SymMatrix< T >::data
private
template<typename T >
size_t SymMatrix< T >::size
private

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