arbb::nested< T > Class Template Reference

A nested container with elements of type T. More...

List of all members.

Public Types

typedef T element_type

Public Member Functions

 nested ()
 Default constructor. Constructs an empty nested container.
 nested (const nested &other)
 Copy constructor.
template<typename U >
 nested (const nested< U > &other)
 Conversion constructor.
 ~nested ()
 Releases this object's reference to any resources associated with this nested container.
nestedoperator= (const nested &other)
 Assignment operator.
dense< T, 1 > flatten () const
 Returns a flattened 1D dense container with the data from each segment in order.
dense< usize, 1 > length (const usize &segment) const
 Returns the number of elements in the segment at index segment.
dense< usize, 1 > lengths () const
 Returns a dense container comprised of the lengths of the segments.
dense< usize, 1 > offsets () const
 Returns a dense container comprised of the total number of elements preceding each segment.
dense< boolean, 1 > flags () const
 Returns a dense container of arbb::boolean with a size equal to the sum of all segment sizes that contains a true value if a new segment begins at a given location.
dense< usize, 1 > indices () const
dense< T, 1 > segment (const usize &i) const
 Returns a copy of the segment at index i.
operator() (const usize &i, const usize &j) const
 Returns a copy of the element from segment i at index j.
nested operator[] (const nested< boolean > &mask) const

Static Public Member Functions

static nested parse (const char *string)

Detailed Description

template<typename T>
class arbb::nested< T >

A nested container with elements of type T.

See Also

Nested Containers

Definition at line 36 of file nested.hpp.


Member Typedef Documentation

template<typename T>
typedef T arbb::nested< T >::element_type

The type of the elements in this nested container.

Definition at line 49 of file nested.hpp.


Constructor & Destructor Documentation

template<typename T>
arbb::nested< T >::nested (  ) 

Default constructor. Constructs an empty nested container.

template<typename T>
arbb::nested< T >::nested ( const nested< T > &  other  ) 

Copy constructor.

Constructs a dense container with the same shape and values as other.

template<typename T>
template<typename U >
arbb::nested< T >::nested ( const nested< U > &  other  )  [inline]

Conversion constructor.

Constructs a nested container with the same shape as src, whose elements are equal to those in src at the corresponding nesting level and index, converted to the destination type using a converting cast.

template<typename T>
arbb::nested< T >::~nested (  ) 

Releases this object's reference to any resources associated with this nested container.


Member Function Documentation

template<typename T>
static nested arbb::nested< T >::parse ( const char *  string  )  [static]
template<typename T>
nested& arbb::nested< T >::operator= ( const nested< T > &  other  ) 

Assignment operator.

Changes the destination to be a copy of src.

template<typename T>
dense<T, 1> arbb::nested< T >::flatten (  )  const

Returns a flattened 1D dense container with the data from each segment in order.

template<typename T>
dense<usize, 1> arbb::nested< T >::length ( const usize segment  )  const

Returns the number of elements in the segment at index segment.

template<typename T>
dense<usize, 1> arbb::nested< T >::lengths (  )  const

Returns a dense container comprised of the lengths of the segments.

template<typename T>
dense<usize, 1> arbb::nested< T >::offsets (  )  const

Returns a dense container comprised of the total number of elements preceding each segment.

template<typename T>
dense<boolean, 1> arbb::nested< T >::flags (  )  const

Returns a dense container of arbb::boolean with a size equal to the sum of all segment sizes that contains a true value if a new segment begins at a given location.

template<typename T>
dense<usize, 1> arbb::nested< T >::indices (  )  const
template<typename T>
dense<T, 1> arbb::nested< T >::segment ( const usize i  )  const

Returns a copy of the segment at index i.

template<typename T>
T arbb::nested< T >::operator() ( const usize i,
const usize j 
) const

Returns a copy of the element from segment i at index j.

template<typename T>
nested arbb::nested< T >::operator[] ( const nested< boolean > &  mask  )  const

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

Submit feedback on this help topic

Copyright © 2010, Intel Corporation. All rights reserved.