Lorene::Dim_tbl Class Reference
[Utilities.]

Storage of array dimensions. More...

#include <dim_tbl.h>

List of all members.

Public Member Functions

 Dim_tbl (int size0)
 1D constructor
 Dim_tbl (int size1, int size0)
 2D constructor
 Dim_tbl (int size2, int size1, int size0)
 3D constructor
 Dim_tbl (int n, int *sizes)
 N_dimensional constructor.
 Dim_tbl (const Dim_tbl &)
 Copy constructor.
 Dim_tbl (FILE *)
 Constructor from a file (see sauve(FILE*) ).
 ~Dim_tbl ()
 Destructor.
void operator= (const Dim_tbl &)
 Assignment.
void sauve (FILE *) const
 Save in a file.
bool operator== (const Dim_tbl &) const
 Comparison operator.

Public Attributes

int ndim
 Number of dimensions of the Tbl: can be 1, 2 or 3.
int * dim
 Array of dimensions (size: ndim).
int taille
 Total size of the array Tbl::t.

Friends

ostream & operator<< (ostream &, const Dim_tbl &)
 Display.

Detailed Description

Storage of array dimensions.

This class is designed for internal purposes related to the class Tbl}, namely the storage of the Tbl} dimensions. ()

Definition at line 99 of file dim_tbl.h.


Constructor & Destructor Documentation

Lorene::Dim_tbl::Dim_tbl ( int  size0  )  [explicit]

1D constructor

Parameters:
size0 [input] Number of elements of the array Tbl::t. Will be assigned to dim[0]. The size 0 is allowed for the 1D constructor but not for the 2D or 3D ones.

Definition at line 100 of file dim_tbl.C.

References dim, ndim, and taille.

Lorene::Dim_tbl::Dim_tbl ( int  size1,
int  size0 
)

2D constructor

Parameters:
size1 [input] Defines the range [0, size1-1] of the outermost index in the storage of the array Tbl::t. Will be assigned to dim[1].
size0 [input] Defines the range [0, size0-1] of the innermost index in the storage of the array Tbl::t. Will be assigned to dim[0].

Definition at line 107 of file dim_tbl.C.

References dim, ndim, and taille.

Lorene::Dim_tbl::Dim_tbl ( int  size2,
int  size1,
int  size0 
)

3D constructor

Parameters:
size2 [input] Defines the range [0, size2-1] of the outermost index in the storage of the array Tbl::t. Will be assigned to dim[2].
size1 [input] Defines the range [0, size1-1] of the intermediate index in the storage of the array Tbl::t. Will be assigned to dim[1].
size0 [input] Defines the range [0, size0-1] of the innermost index in the storage of the array Tbl::t. Will be assigned to dim[0].

Definition at line 115 of file dim_tbl.C.

References dim, ndim, and taille.

Lorene::Dim_tbl::Dim_tbl ( int  n,
int *  sizes 
)

N_dimensional constructor.

Parameters:
n [input] number of dimensions.
sizes [input] array of the dimensions.

Definition at line 125 of file dim_tbl.C.

References dim, ndim, and taille.

Lorene::Dim_tbl::Dim_tbl ( const Dim_tbl titi  ) 

Copy constructor.

Definition at line 137 of file dim_tbl.C.

References dim, ndim, and taille.

Lorene::Dim_tbl::Dim_tbl ( FILE *  fd  )  [explicit]

Constructor from a file (see sauve(FILE*) ).

Definition at line 146 of file dim_tbl.C.

References dim, Lorene::fread_be(), ndim, and taille.

Lorene::Dim_tbl::~Dim_tbl (  ) 

Destructor.

Definition at line 161 of file dim_tbl.C.

References dim.


Member Function Documentation

void Lorene::Dim_tbl::operator= ( const Dim_tbl titi  ) 

Assignment.

Definition at line 170 of file dim_tbl.C.

References dim, ndim, and taille.

bool Lorene::Dim_tbl::operator== ( const Dim_tbl ti  )  const

Comparison operator.

Definition at line 208 of file dim_tbl.C.

References dim, and ndim.

void Lorene::Dim_tbl::sauve ( FILE *  fd  )  const

Save in a file.

Definition at line 185 of file dim_tbl.C.

References dim, Lorene::fwrite_be(), and ndim.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ,
const Dim_tbl  
) [friend]

Display.


Member Data Documentation

Array of dimensions (size: ndim).

Definition at line 102 of file dim_tbl.h.

Number of dimensions of the Tbl: can be 1, 2 or 3.

Definition at line 101 of file dim_tbl.h.

Total size of the array Tbl::t.

  • taille = dim[0] if ndim = 1
  • taille = dim[0]*dim[1] if ndim = 2
  • taille = dim[0]*dim[1]*dim[2] if ndim = 3

Definition at line 112 of file dim_tbl.h.


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

Generated on 7 Dec 2019 for LORENE by  doxygen 1.6.1