MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Conv< vector< vector< T > > > Class Template Reference

#include <Conv.h>

+ Collaboration diagram for Conv< vector< vector< T > > >:

Static Public Member Functions

static const vector< vector< T > > buf2val (double **buf)
 
static string rttiType ()
 
static unsigned int size (const vector< vector< T > > &val)
 
static void str2val (vector< vector< T > > &val, const string &s)
 
static void val2buf (const vector< vector< T > > &val, double **buf)
 
static void val2str (string &s, const vector< vector< T > > &val)
 

Detailed Description

template<class T>
class Conv< vector< vector< T > > >

Still more specialized partial specialization. This works with any field that has a uniform size. Assume strings are the only exception. The first double in the vector vec_ holds the # of data entries that follow it. This excludes the space for the size entry itself. This can be a ragged array: the number of entries in each vector need not be the same. The order of entries is: 0 : Dimension of left index, can be zero. As double. 1:numDim : Dimensions of right index. Any and all can be zero. Double. numDim+1 to total: Data, in condensed format.

Definition at line 497 of file Conv.h.

Member Function Documentation

template<class T >
static const vector< vector< T > > Conv< vector< vector< T > > >::buf2val ( double **  buf)
inlinestatic

Definition at line 514 of file Conv.h.

References numEntries.

515  {
516  static vector< vector< T > > ret;
517  ret.clear();
518  unsigned int numEntries = **buf; // first entry is vec size
519  ret.resize( numEntries );
520  (*buf)++;
521  for ( unsigned int i = 0; i < numEntries; ++i ) {
522  unsigned int rowSize = **buf;
523  (*buf)++;
524  for ( unsigned int j = 0; j < rowSize; ++j )
525  ret[i].push_back( Conv< T >::buf2val( buf ) );
526  }
527  return ret;
528  }
const int numEntries
Definition: proc.cpp:60
Definition: Conv.h:30
template<class T >
static string Conv< vector< vector< T > > >::rttiType ( )
inlinestatic

Definition at line 550 of file Conv.h.

References Conv< T >::rttiType().

550  {
551  string ret = "vector< vector<" + Conv< T >::rttiType() + "> >";
552  return ret;
553  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T >
static unsigned int Conv< vector< vector< T > > >::size ( const vector< vector< T > > &  val)
inlinestatic

Definition at line 500 of file Conv.h.

References Conv< T >::size().

501  {
502  unsigned int ret = 1 + val.size();
503  for ( unsigned int i = 0; i < val.size(); ++i ) {
504  if ( val[i].size() > 0 ) {
505  ret += val[i].size() * Conv< T >::size( val[i][0] );
506  } else {
507  T temp = T();
508  ret += val[i].size() * Conv< T >::size( temp );
509  }
510  }
511  return ret;
512  }
static unsigned int size(const T &val)
Definition: Conv.h:38
static unsigned int size(const vector< vector< T > > &val)
Definition: Conv.h:500

+ Here is the call graph for this function:

template<class T >
static void Conv< vector< vector< T > > >::str2val ( vector< vector< T > > &  val,
const string &  s 
)
inlinestatic

Definition at line 543 of file Conv.h.

543  {
544  cout << "Specialized Conv< vector< vector< T > > >::str2val not done\n";
545  }
template<class T >
static void Conv< vector< vector< T > > >::val2buf ( const vector< vector< T > > &  val,
double **  buf 
)
inlinestatic

Definition at line 530 of file Conv.h.

References Conv< T >::val2buf().

531  {
532  double* temp = *buf;
533  *temp++ = val.size();
534  for( unsigned int i = 0; i < val.size(); ++i ) {
535  *temp++ = val[i].size();
536  for ( unsigned int j = 0; j < val[i].size(); ++j ) {
537  Conv< T >::val2buf( val[i][j], &temp );
538  }
539  }
540  *buf = temp;
541  }
static void val2buf(const T &val, double **buf)
Definition: Conv.h:56

+ Here is the call graph for this function:

template<class T >
static void Conv< vector< vector< T > > >::val2str ( string &  s,
const vector< vector< T > > &  val 
)
inlinestatic

Definition at line 547 of file Conv.h.

547  {
548  cout << "Specialized Conv< vector< vector< T > > >::val2str not done\n";
549  }

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