Domi
Multi-dimensional, distributed data structures
 All Classes Files Functions Variables Typedefs Friends
Public Member Functions | List of all members
Domi::ConcreteSlice Struct Reference

A ConcreteSlice is a Slice that does not accept Default or negative start or stop values. More...

#include <Domi_Slice.hpp>

+ Inheritance diagram for Domi::ConcreteSlice:

Public Member Functions

 ConcreteSlice (dim_type stopVal)
 One argument constructor. More...
 
 ConcreteSlice (dim_type startVal, dim_type stopVal, dim_type stepVal=1)
 Two or three argument constructor. More...
 
virtual ~ConcreteSlice ()
 Destructor.
 
Slice bounds (dim_type size) const
 Simply return this ConcreteSlice.
 
- Public Member Functions inherited from Domi::Slice
std::string toString () const
 Return a string representation of the Slice. More...
 
 Slice ()
 Default constructor. More...
 
 Slice (dim_type stopVal)
 One argument constructor. More...
 
 Slice (dim_type startVal, dim_type stopVal, dim_type stepVal=1)
 Two or three argument constructor. More...
 
 Slice (const Slice &source)
 Copy constructor.
 
virtual ~Slice ()
 Destructor.
 
const dim_type start () const
 Start index. More...
 
const dim_type stop () const
 Stop index. More...
 
const dim_type step () const
 Step interval. More...
 
Sliceoperator= (const Slice &source)
 Assignment operator.
 
bool operator== (const Slice &slice) const
 Equals operator.
 
bool operator!= (const Slice &slice) const
 Inequality operator.
 

Additional Inherited Members

- Public Types inherited from Domi::Slice
typedef Domi::dim_type dim_type
 The type for start indexes, stop indexes, and step intervals.
 
- Static Public Attributes inherited from Domi::Slice
static const dim_type Default
 Default value for Slice constructors. More...
 

Detailed Description

A ConcreteSlice is a Slice that does not accept Default or negative start or stop values.

By ensuring that the start, stop and step values are all concrete, the bounds() method can just return *this, which is much more efficient than the base class Slice implementation of bounds().

It is not expected that the end user should ever have to deal directly with ConcreteSlice. The Slice bounds() method returns a Slice object that is in fact a ConcreteSlice. Any further calls to bounds() will therefore be efficient.

Constructor & Destructor Documentation

Domi::ConcreteSlice::ConcreteSlice ( dim_type  stopVal)

One argument constructor.

Parameters
stopVal[in] The stop index of the Slice

Returns Slice with start == 0, step == stopVal, step == 1.

Domi::ConcreteSlice::ConcreteSlice ( dim_type  startVal,
dim_type  stopVal,
dim_type  stepVal = 1 
)

Two or three argument constructor.

Parameters
startVal[in] The start index of the slice.
stopVal[in] The stop index of the slice.
stepVal[in] The step interval of the slice.

Returns Slice with start == startVal, step == stopVal, step == stepVal (default 1).


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

Generated on Fri Nov 22 2024 09:26:43 for Domi by doxygen 1.8.5