tfel
Loading...
Searching...
No Matches
numodis::IDirection Struct Reference

Handles the indices of a discrete direction. More...

#include </home/runner/work/tfel/tfel/include/NUMODIS/IDirection.hxx>

Public Types

using size_type = std::vector<int>::size_type

Public Member Functions

 IDirection (size_type nindices)
 Constructor.
 IDirection (const std::vector< int > &ivector)
 Constructor.
void Reset ()
 Reset the direction to 0.
bool IsNull () const
 Determines whether the vector is null or not.
void setIDirection (const std::vector< int > &idirection)
 set the indices of this discrete direction
const std::vector< int > & getIndex () const
 Return the index of the vector.
long unsigned int getNindices () const
 Return the number of indices of the vector.

Protected Attributes

std::vector< int > _index
 index of the vector

Friends

TFELNUMODIS_VISIBILITY_FRIEND_EXPORT friend std::ostream & operator<< (std::ostream &, const IDirection &)
TFELNUMODIS_VISIBILITY_FRIEND_EXPORT friend bool operator== (const IDirection &lhs, const IDirection &rhs)
TFELNUMODIS_VISIBILITY_FRIEND_EXPORT friend bool operator!= (const IDirection &lhs, const IDirection &rhs)

Detailed Description

Handles the indices of a discrete direction.

Constructor & Destructor Documentation

◆ IDirection() [1/2]

numodis::IDirection::IDirection ( size_type nindices)
inlineexplicit

Constructor.

Parameters
nindicesnumber of indices

◆ IDirection() [2/2]

numodis::IDirection::IDirection ( const std::vector< int > & ivector)
inlineexplicit

Constructor.

Parameters
ivectorindices of the vector

Member Function Documentation

◆ getIndex()

const std::vector< int > & numodis::IDirection::getIndex ( ) const
inlinenodiscard

Return the index of the vector.

Returns
reference on the vector's indices

◆ getNindices()

long unsigned int numodis::IDirection::getNindices ( ) const
inlinenodiscard

Return the number of indices of the vector.

Returns
number of indices

◆ IsNull()

bool numodis::IDirection::IsNull ( ) const
inlinenodiscard

Determines whether the vector is null or not.

Returns
true if vector=0, false otherwise

◆ setIDirection()

void numodis::IDirection::setIDirection ( const std::vector< int > & idirection)
inline

set the indices of this discrete direction

Parameters
idirectionindices of the direction

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