CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
cla3p::Tuple< T_Int, T_Scalar > Class Template Reference

Coordinate-value triple container. More...

Inheritance diagram for cla3p::Tuple< T_Int, T_Scalar >:

Public Member Functions

 Tuple ()
 Default constructor.
 Tuple (T_Int r, T_Int c, T_Scalar v)
 Value constructor.
 ~Tuple ()
 Destructor.
T_Scalar val () const
 Value accessor.
void clear ()
 Clears the tuple.
Public Member Functions inherited from cla3p::Coord< T_Int >
 Coord ()
 Default constructor.
 Coord (T_Int r, T_Int c)
 Coordinate constructor.
 ~Coord ()
 Destructor.
T_Int row () const
 Row index accessor.
T_Int col () const
 Column index accessor.

Detailed Description

template<typename T_Int, typename T_Scalar>
class cla3p::Tuple< T_Int, T_Scalar >

Coordinate-value triple container.

Template Parameters
T_IntInteger type for coordinate indices.
T_ScalarScalar type for the stored value.

Extends Coord with an associated scalar value, representing a position and its corresponding data within a two-dimensional structure.

Constructor & Destructor Documentation

◆ Tuple() [1/2]

template<typename T_Int, typename T_Scalar>
cla3p::Tuple< T_Int, T_Scalar >::Tuple ( )
inline

Default constructor.

Constructs a tuple initialized to (0, 0, 0).

◆ Tuple() [2/2]

template<typename T_Int, typename T_Scalar>
cla3p::Tuple< T_Int, T_Scalar >::Tuple ( T_Int r,
T_Int c,
T_Scalar v )
inline

Value constructor.

Constructs a tuple with specified row, column, and value.

Parameters
[in]rThe row index.
[in]cThe column index.
[in]vThe scalar value.

◆ ~Tuple()

template<typename T_Int, typename T_Scalar>
cla3p::Tuple< T_Int, T_Scalar >::~Tuple ( )
inline

Destructor.

Destroys the tuple object.

Member Function Documentation

◆ val()

template<typename T_Int, typename T_Scalar>
T_Scalar cla3p::Tuple< T_Int, T_Scalar >::val ( ) const
inline

Value accessor.

Returns the scalar value stored in the tuple.

Returns
The tuple value.

◆ clear()

template<typename T_Int, typename T_Scalar>
void cla3p::Tuple< T_Int, T_Scalar >::clear ( )
inline

Clears the tuple.

Resets the coordinate and value to their default states (0, 0, 0).