Alien  1.3.0
User documentation
Loading...
Searching...
No Matches
Alien::Space Class Referencefinal

Implementation of an algebraic space. More...

#include <core/alien/data/Space.h>

Classes

class  Internal
 Internal structure of Space object. More...

Public Member Functions

 Space ()
 Constructor.
 Space (Arccore::Integer size)
 Anonymous constructor. The space have no name.
 Space (Arccore::Integer size, Arccore::String name)
 Full constructor.
 Space (const Space &s)
 Copy constructor.
 Space (Space &&s)
 Rvalue constructor.
 ~Space ()
 Free resources.
Spaceoperator= (const Space &src)
 Equal operator.
Spaceoperator= (Space &&src)
 Rvalue equal operator.
bool operator== (const ISpace &space) const
 Comparison operator.
bool operator!= (const ISpace &space) const
 Comparison operator.
Arccore::Integer size () const
 Get space size.
const Arccore::String & name () const
 Get space name.
void setField (Arccore::String label, const Arccore::UniqueArray< Arccore::Integer > &indices)
 Set label on matrix entries.
Arccore::Integer nbField () const
 Get the number of fields.
Arccore::String fieldLabel (Arccore::Integer i) const
 Get the label of the i-th field.
const Arccore::UniqueArray< Arccore::Integer > & field (Arccore::Integer i) const
 Get indices associated to the i-th field \para[in] i The requested field.
const Arccore::UniqueArray< Arccore::Integer > & field (Arccore::String label) const
 Get the indices associated to a label.
std::shared_ptr< ISpaceclone () const
 Clone this object.
Public Member Functions inherited from Alien::ISpace
virtual ~ISpace ()
 Free resources.

Additional Inherited Members

Protected Member Functions inherited from Alien::ISpace
 ISpace ()
 Constructor.

Detailed Description

Implementation of an algebraic space.

An algebraic space is composed of a name and size, on which can be added some labels over some elements on this space. The purpose is to be able to differentiate different spaces which have the same size, although operations between elements on those spaces should not be permitted. It is close to the algebraic definition of a space

Definition at line 46 of file Space.h.

Constructor & Destructor Documentation

◆ Space() [1/5]

Alien::Space::Space ( )

Constructor.

Definition at line 149 of file Space.cc.

References Space().

Referenced by operator=(), operator=(), Space(), Space(), Space(), and Space().

◆ Space() [2/5]

Alien::Space::Space ( Arccore::Integer size)

Anonymous constructor. The space have no name.

Parameters
[in]sizeThe size of the space

References size().

◆ Space() [3/5]

Alien::Space::Space ( Arccore::Integer size,
Arccore::String name )

Full constructor.

Parameters
[in]sizeThe size of the space
[in]nameThe name of the space

References Alien::ISpace::ISpace(), name(), operator!=(), operator=(), operator==(), size(), and Space().

◆ Space() [4/5]

Alien::Space::Space ( const Space & s)

Copy constructor.

Parameters
[in]sThe space to copy

Definition at line 170 of file Space.cc.

References Alien::ISpace::ISpace(), and Space().

◆ Space() [5/5]

Alien::Space::Space ( Space && s)

Rvalue constructor.

Parameters
[in]sThe space to take

Definition at line 178 of file Space.cc.

References Space().

◆ ~Space()

Alien::Space::~Space ( )

Free resources.

Definition at line 185 of file Space.cc.

Member Function Documentation

◆ clone()

std::shared_ptr< ISpace > Alien::Space::clone ( ) const
virtual

Clone this object.

Returns
A clone of this object

Implements Alien::ISpace.

Definition at line 289 of file Space.cc.

Referenced by field().

◆ field() [1/2]

const Arccore::UniqueArray< Arccore::Integer > & Alien::Space::field ( Arccore::Integer i) const
virtual

Get indices associated to the i-th field \para[in] i The requested field.

Returns
The indices associated to the field

Implements Alien::ISpace.

◆ field() [2/2]

const Arccore::UniqueArray< Arccore::Integer > & Alien::Space::field ( Arccore::String label) const
virtual

Get the indices associated to a label.

Parameters
[in]labelThe requested label
Returns
The indices associated to the field

Implements Alien::ISpace.

References clone().

◆ fieldLabel()

Arccore::String Alien::Space::fieldLabel ( Arccore::Integer i) const
virtual

Get the label of the i-th field.

Parameters
[in]iThe requested field
Returns
The associated label

Implements Alien::ISpace.

◆ name()

const String & Alien::Space::name ( ) const
virtual

Get space name.

Returns
The name of the space

Implements Alien::ISpace.

Definition at line 236 of file Space.cc.

Referenced by operator==(), and Space().

◆ nbField()

Integer Alien::Space::nbField ( ) const
virtual

Get the number of fields.

Returns
The number of fields (labels)

Implements Alien::ISpace.

Definition at line 253 of file Space.cc.

Referenced by setField().

◆ operator!=()

bool Alien::Space::operator!= ( const ISpace & space) const
virtual

Comparison operator.

Parameters
[in]Space related functions.The space to compare to
Returns
Wheteher the spaces are different

Implements Alien::ISpace.

Definition at line 227 of file Space.cc.

References Alien::ISpace::ISpace(), and operator==().

Referenced by Space().

◆ operator=() [1/2]

Space & Alien::Space::operator= ( const Space & src)

Equal operator.

Parameters
[in]srcThe space to copy
Returns
The space copied

Definition at line 191 of file Space.cc.

References Space().

Referenced by Space().

◆ operator=() [2/2]

Space & Alien::Space::operator= ( Space && src)

Rvalue equal operator.

Parameters
[in]srcThe space to copy
Returns
The space copied

Definition at line 201 of file Space.cc.

References Space().

◆ operator==()

bool Alien::Space::operator== ( const ISpace & space) const
virtual

Comparison operator.

Parameters
[in]Space related functions.The space to compare to
Returns
Wheteher the spaces are the same

Implements Alien::ISpace.

Definition at line 219 of file Space.cc.

References Alien::ISpace::ISpace(), Alien::ISpace::name(), name(), Alien::ISpace::size(), and size().

Referenced by operator!=(), and Space().

◆ setField()

void Alien::Space::setField ( Arccore::String label,
const Arccore::UniqueArray< Arccore::Integer > & indices )
virtual

Set label on matrix entries.

Parameters
[in]labelThe name of the label
[in]indicesThe indices to which label is set

Implements Alien::ISpace.

References nbField().

◆ size()

Integer Alien::Space::size ( ) const
virtual

Get space size.

Returns
The size of the space

Implements Alien::ISpace.

Definition at line 211 of file Space.cc.

Referenced by operator==(), Space(), and Space().


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