STK++ 0.9.13
Kernel tools

The STKernel project is the low-level core library that forms the basis of the project. More...

Collaboration diagram for Kernel tools:

Modules

 Fundamental data types
 In this subproject we define the fundamental types.
 
 Functors
 In the Functors subproject, we implement the main functors that can be used throughout the STK++ project, especially in the Arrays project.
 

Classes

struct  STK::hidden::Promote< Type, Type >
 Specialization when we have the same type. More...
 
class  STK::RangeBase< Derived >
 Base class for TRange class. More...
 
class  STK::TRange< Size_ >
 Index sub-vector region with fixed size. More...
 
class  STK::TRange< UnknownSize >
 Index sub-vector region: Specialization when the size is unknown. More...
 

Functions

template<int SizeI_, int SizeJ_>
Range STK::sup (TRange< SizeI_ > const &I, TRange< SizeJ_ > const &J)
 compute sup(I,J).
 
template<int SizeI_, int SizeJ_>
Range STK::inf (TRange< SizeI_ > const &I, TRange< SizeJ_ > const &J)
 compute inf(I,J).
 
template<int SizeI_>
Range STK::incFirst (TRange< SizeI_ > const &I)
 if I=a:b, return a+1:b
 
template<int SizeI_>
Range STK::incLast (TRange< SizeI_ > const &I)
 if I=a:b, return a:b+1
 
template<int SizeI_>
Range STK::decFirst (TRange< SizeI_ > const &I)
 if I=a:b, return a-1:b
 
template<int SizeI_>
Range STK::decLast (TRange< SizeI_ > const &I)
 if I=a:b, return a:b-1
 

Detailed Description

The STKernel project is the low-level core library that forms the basis of the project.

It provides data class handling for C++. It contains the sub-projects:

Function Documentation

◆ decFirst()

template<int SizeI_>
Range STK::decFirst ( TRange< SizeI_ > const I)

if I=a:b, return a-1:b

Returns
range I with first index + 1

Definition at line 498 of file STK_Range.h.

499{ return Range(I.begin()-1, I.lastIdx(), 0);}
TRange< UnknownSize > Range
Definition STK_Range.h:59

◆ decLast()

template<int SizeI_>
Range STK::decLast ( TRange< SizeI_ > const I)

if I=a:b, return a:b-1

Returns
range I with first index + 1

Definition at line 505 of file STK_Range.h.

506{ return Range(I.begin(), I.lastIdx()-1, 0);}

Referenced by STK::IArray1D< Derived >::erase(), and STK::IArray1D< Derived >::popBack().

◆ incFirst()

template<int SizeI_>
Range STK::incFirst ( TRange< SizeI_ > const I)

if I=a:b, return a+1:b

Returns
range I with first index + 1

Definition at line 484 of file STK_Range.h.

485{ return Range(I.begin()+1, I.lastIdx(), 0);}

◆ incLast()

template<int SizeI_>
Range STK::incLast ( TRange< SizeI_ > const I)

if I=a:b, return a:b+1

Returns
range I with first index + 1

Definition at line 491 of file STK_Range.h.

492{ return Range(I.begin(), I.lastIdx()+1, 0);}

Referenced by STK::IArray1D< Derived >::insertElt().

◆ inf()

◆ sup()

template<int SizeI_, int SizeJ_>
Range STK::sup ( TRange< SizeI_ > const I,
TRange< SizeJ_ > const J 
)

compute sup(I,J).

Take the lowest value of I.begin() and J.begin() for begin and the largest value of I.end() and J.end() for end.

Parameters
I,Jthe first and second Range

Definition at line 468 of file STK_Range.h.

469{ return Range(std::min(I.begin(), J.begin()), std::max(I.lastIdx(), J.lastIdx()), 0);}