Lattice Tester Online Documentation 0.1.0-861
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
Loading...
Searching...
No Matches
NTL::matrix< T > Class Template Reference

A subclass of the NTL::Mat<T> class. More...

#include <latticetester/NTLWrap.h>

+ Inheritance diagram for NTL::matrix< T >:

Public Types

typedef std::int64_t size_type
 

Public Member Functions

 matrix ()
 Empty constructor.
 
 matrix (const Mat< T > &a)
 Copy constructor.
 
 matrix (size_type size1, size_type size2)
 Allocation constructor.
 
void resize (size_type size1, size_type size2)
 Set the matrix dimensions to size1 \(\times\)size2.
 
void clear ()
 Releases space and sets the matrix this size \(0\times 0\).
 
size_type size1 () const
 Returns the number of rows of the matrix.
 
size_type size2 () const
 Returns the number of columns of the matrix.
 
T & operator() (size_type i, size_type j)
 DEPRECATED !!!
 
const T & operator() (size_type i, size_type j) const
 

Detailed Description

template<typename T>
class NTL::matrix< T >

A subclass of the NTL::Mat<T> class.

It extends its parent with a few methods and overloads a few others with more compatible defaults.

Member Typedef Documentation

◆ size_type

template<typename T >
std::int64_t NTL::matrix< T >::size_type

Constructor & Destructor Documentation

◆ matrix() [1/3]

template<typename T >
NTL::matrix< T >::matrix ( )
inline

Empty constructor.

◆ matrix() [2/3]

template<typename T >
NTL::matrix< T >::matrix ( const Mat< T > & a)
inline

Copy constructor.

Creates a new matrix that is a copy of a.

Parameters
aMatrix to be copied.

◆ matrix() [3/3]

template<typename T >
NTL::matrix< T >::matrix ( size_type size1,
size_type size2 )
inline

Allocation constructor.

Creates and allocates a size1 \(\times\)size2 matrix, initializing the elements T with their default constructor.

Parameters
size1Height of the matrix
size2Width of the matrix

Member Function Documentation

◆ clear()

template<typename T >
void NTL::matrix< T >::clear ( )
inline

Releases space and sets the matrix this size \(0\times 0\).

This uses NTL::Mat<T>::kill().

NOT COMPATIBLE WITH clear() in NTL and ELSEWHERE !!! ********* It should initialize to 0 but not destroy the object !!

◆ operator()() [1/2]

template<typename T >
T & NTL::matrix< T >::operator() ( size_type i,
size_type j )
inline

DEPRECATED !!!

Overload to change the indexation reference for (i,j) operator to start from 0. In NTL::Vec<T> the (i,j) operator starts from 1 which is not compatible with boost. ** ALSO DANGEROUS. USE [] instead. **

◆ operator()() [2/2]

template<typename T >
const T & NTL::matrix< T >::operator() ( size_type i,
size_type j ) const
inline

◆ resize()

template<typename T >
void NTL::matrix< T >::resize ( size_type size1,
size_type size2 )
inline

Set the matrix dimensions to size1 \(\times\)size2.

This is just an alis to NTL::Mat<T>::SetDims(size1, size2).

Parameters
size1New number of rows in the matrix.
size2New number of columns in the matrix.

◆ size1()

template<typename T >
size_type NTL::matrix< T >::size1 ( ) const
inline

Returns the number of rows of the matrix.

◆ size2()

template<typename T >
size_type NTL::matrix< T >::size2 ( ) const
inline

Returns the number of columns of the matrix.


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