Public Member Functions | Private Attributes

util::Multiarrays< T, Pr > Class Template Reference

A wrapper class to hold multiple arrays. More...

#include <util/multiarrays.hpp>


Detailed Description

template<typename T, typename Pr>
class util::Multiarrays< T, Pr >

A wrapper class to hold multiple arrays.

List of all members.

Public Member Functions

 Multiarrays (const Pr **arrays, const int *lengths, int numArray)
 Builds a data tructure to hold multiple arrays.
const Properator[] (int x) const
int getLength (int i) const
int arrayCount () const

Private Attributes

const Pr ** arrs
int numArr
const int * lens

Constructor & Destructor Documentation

template<typename T, typename Pr>
util::Multiarrays< T, Pr >::Multiarrays ( const Pr **  arrays,
const int *  lengths,
int  numArray 
) [inline]

Builds a data tructure to hold multiple arrays.

Parameters:
arrays each element contains a pointer to the head of a 1D array
lengths each element contains the length of corresponding array
numArray the number of array in the data structure

Member Function Documentation

template<typename T, typename Pr>
int util::Multiarrays< T, Pr >::arrayCount (  )  const [inline]
Returns:
the number of prefix sum array
template<typename T, typename Pr>
int util::Multiarrays< T, Pr >::getLength ( int  i  )  const [inline]
Returns:
the length of the i-th prefix sum array. It is indexed in [0; getLength(i)-1]
template<typename T, typename Pr>
const Pr& util::Multiarrays< T, Pr >::operator[] ( int  x  )  const [inline]
Returns:
the x-th prefix sum array

Member Data Documentation

template<typename T, typename Pr>
const Pr** util::Multiarrays< T, Pr >::arrs [private]
template<typename T, typename Pr>
const int* util::Multiarrays< T, Pr >::lens [private]
template<typename T, typename Pr>
int util::Multiarrays< T, Pr >::numArr [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines