SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
CIndirectObject< T, P > Class Template Reference

Detailed Description

template<class T, class P>
class shogun::CIndirectObject< T, P >

an array class that accesses elements indirectly via an index array.

It does not store the objects itself, but only indices to objects. This conveniently allows e.g. sorting the array without changing the order of objects (but only the order of their indices).

Definition at line 25 of file IndirectObject.h.

Public Member Functions

 CIndirectObject ()
 
 CIndirectObject (int32_t idx)
 
CIndirectObject< T, P > & operator= (const CIndirectObject< T, P > &x)
 
operator| (const CIndirectObject< T, P > &x) const
 
const T operator& (const CIndirectObject< T, P > &x) const
 
operator<< (int shift)
 
operator>> (int shift)
 
operator^ (const CIndirectObject< T, P > &x) const
 
operator+ (const CIndirectObject< T, P > &x) const
 
operator- (const CIndirectObject< T, P > &x) const
 
operator/ (const CIndirectObject< T, P > &x) const
 
operator* (const CIndirectObject< T, P > &x) const
 
CIndirectObject< T, P > & operator+= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator-= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator*= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator/= (const CIndirectObject< T, P > &x)
 
bool operator== (const CIndirectObject< T, P > &x) const
 
bool operator>= (const CIndirectObject< T, P > &x) const
 
bool operator<= (const CIndirectObject< T, P > &x) const
 
bool operator> (const CIndirectObject< T, P > &x) const
 
bool operator< (const CIndirectObject< T, P > &x) const
 
bool operator!= (const CIndirectObject< T, P > &x) const
 
CIndirectObject< T, P > & operator|= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator&= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator^= (const CIndirectObject< T, P > &x)
 
CIndirectObject< T, P > & operator<<= (int shift)
 
CIndirectObject< T, P > & operator>>= (int shift)
 
operator~ ()
 
 operator T () const
 
CIndirectObject< T, P > & operator-- ()
 
CIndirectObject< T, P > & operator++ ()
 

Static Public Member Functions

static void set_array (P a)
 
static P get_array ()
 
static void init_slice (CIndirectObject< T, P > *a, int32_t len, int32_t start=0, int32_t stop=-1)
 

Protected Attributes

int32_t index
 

Static Protected Attributes

static P array
 

Constructor & Destructor Documentation

default constructor (initializes index with -1)

Definition at line 31 of file IndirectObject.h.

CIndirectObject ( int32_t  idx)

constructor

Parameters
idxindex

Definition at line 38 of file IndirectObject.h.

Member Function Documentation

static P get_array ( )
static

get array

Returns
array

Definition at line 56 of file IndirectObject.h.

static void init_slice ( CIndirectObject< T, P > *  a,
int32_t  len,
int32_t  start = 0,
int32_t  stop = -1 
)
static

initialize slice

Returns
array

Definition at line 65 of file IndirectObject.h.

operator T ( ) const

return array element

Definition at line 329 of file IndirectObject.h.

bool operator!= ( const CIndirectObject< T, P > &  x) const

overload ! operator; test if current object is not equal to x

Parameters
xx

Definition at line 257 of file IndirectObject.h.

const T operator& ( const CIndirectObject< T, P > &  x) const

overload & operator and return x & y

Parameters
xx

Definition at line 96 of file IndirectObject.h.

CIndirectObject<T,P>& operator&= ( const CIndirectObject< T, P > &  x)

overload &= operator

perform bitwise and with current element and x

Parameters
xx

Definition at line 280 of file IndirectObject.h.

T operator* ( const CIndirectObject< T, P > &  x) const

overload * operator and return x * y

Parameters
xx

Definition at line 163 of file IndirectObject.h.

CIndirectObject<T,P>& operator*= ( const CIndirectObject< T, P > &  x)

overload *= operator; multiple x to with current element

Parameters
xx

Definition at line 192 of file IndirectObject.h.

T operator+ ( const CIndirectObject< T, P > &  x) const

overload + operator and return x + y

Parameters
xx

Definition at line 136 of file IndirectObject.h.

CIndirectObject<T,P>& operator++ ( )

increment element by one

Definition at line 339 of file IndirectObject.h.

CIndirectObject<T,P>& operator+= ( const CIndirectObject< T, P > &  x)

overload += operator; add x to current element

Parameters
xx

Definition at line 172 of file IndirectObject.h.

T operator- ( const CIndirectObject< T, P > &  x) const

overload - operator and return x - y

Parameters
xx

Definition at line 145 of file IndirectObject.h.

CIndirectObject<T,P>& operator-- ( )

decrement element by one

Definition at line 332 of file IndirectObject.h.

CIndirectObject<T,P>& operator-= ( const CIndirectObject< T, P > &  x)

overload -= operator; substract x from current element

Parameters
xx

Definition at line 182 of file IndirectObject.h.

T operator/ ( const CIndirectObject< T, P > &  x) const

overload / operator and return x / y

Parameters
xx

Definition at line 154 of file IndirectObject.h.

CIndirectObject<T,P>& operator/= ( const CIndirectObject< T, P > &  x)

overload /= operator; divide current object by x

Parameters
xx

Definition at line 202 of file IndirectObject.h.

bool operator< ( const CIndirectObject< T, P > &  x) const

overload < operator; test if current object is smaller than x

Parameters
xx

Definition at line 248 of file IndirectObject.h.

T operator<< ( int  shift)

overload << operator

perform bit shift to the left

Parameters
shiftshift by this amount

Definition at line 107 of file IndirectObject.h.

CIndirectObject<T,P>& operator<<= ( int  shift)

overload <<= operator

perform bit shift to the left

Parameters
shiftshift by this amount

Definition at line 304 of file IndirectObject.h.

bool operator<= ( const CIndirectObject< T, P > &  x) const

overload <= operator; test if current object lower equal x

Parameters
xx

Definition at line 230 of file IndirectObject.h.

CIndirectObject<T,P>& operator= ( const CIndirectObject< T, P > &  x)

overload = operator

Parameters
xassign elements from x

Definition at line 77 of file IndirectObject.h.

bool operator== ( const CIndirectObject< T, P > &  x) const

overload == operator; test if current object equals x

Parameters
xx

Definition at line 212 of file IndirectObject.h.

bool operator> ( const CIndirectObject< T, P > &  x) const

overload > operator; test if current object is bigger than x

Parameters
xx

Definition at line 239 of file IndirectObject.h.

bool operator>= ( const CIndirectObject< T, P > &  x) const

overload >= operator; test if current object greater equal x

Parameters
xx

Definition at line 221 of file IndirectObject.h.

T operator>> ( int  shift)

overload >> operator

perform bit shift to the right

Parameters
shiftshift by this amount

Definition at line 118 of file IndirectObject.h.

CIndirectObject<T,P>& operator>>= ( int  shift)

overload >>= operator

perform bit shift to the right

Parameters
shiftshift by this amount

Definition at line 316 of file IndirectObject.h.

T operator^ ( const CIndirectObject< T, P > &  x) const

overload ^ operator and return x ^ y

Parameters
xx

Definition at line 127 of file IndirectObject.h.

CIndirectObject<T,P>& operator^= ( const CIndirectObject< T, P > &  x)

overload ^= operator

perform bitwise xor with current element and x

Parameters
xx

Definition at line 292 of file IndirectObject.h.

T operator| ( const CIndirectObject< T, P > &  x) const

overload | operator and return x | y

Parameters
xx

Definition at line 87 of file IndirectObject.h.

CIndirectObject<T,P>& operator|= ( const CIndirectObject< T, P > &  x)

overload |= operator

perform bitwise or with current element and x

Parameters
xx

Definition at line 268 of file IndirectObject.h.

T operator~ ( )

negate element

Definition at line 323 of file IndirectObject.h.

static void set_array ( a)
static

set array

Parameters
aarray

Definition at line 47 of file IndirectObject.h.

Member Data Documentation

P array
staticprotected

array

Definition at line 347 of file IndirectObject.h.

int32_t index
protected

index into array

Definition at line 350 of file IndirectObject.h.


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

SHOGUN Machine Learning Toolbox - Documentation