escript  Revision_
Namespaces | Functions
DataTypes.cpp File Reference
#include "DataTypes.h"
#include "DataException.h"
#include <sstream>
#include <boost/python/extract.hpp>
#include <boost/python/tuple.hpp>

Namespaces

 escript
 
 escript::DataTypes
 Contains the types to represent Shapes, Regions, RegionLoop ranges and vectors of data as well as the functions to manipulate them.
 

Functions

int escript::DataTypes::noValues (const DataTypes::ShapeType &shape)
 Calculate the number of values in a datapoint with the given shape. More...
 
int escript::DataTypes::noValues (const DataTypes::RegionLoopRangeType &region)
 Calculate the number of values for the given region. More...
 
std::string escript::DataTypes::shapeToString (const DataTypes::ShapeType &shape)
 Return the given shape as a string. More...
 
DataTypes::RegionType escript::DataTypes::getSliceRegion (const DataTypes::ShapeType &shape, const bp::object &key)
 
DataTypes::ShapeType escript::DataTypes::getResultSliceShape (const DataTypes::RegionType &region)
 Determine the shape of the specified slice region. More...
 
DataTypes::RegionLoopRangeType escript::DataTypes::getSliceRegionLoopRange (const DataTypes::RegionType &region)
 Modify region to copy from in order to deal with the case where one range in the region contains identical indexes, eg: <<1,1><0,3><0,3>> This situation implies we want to copy from an object with rank greater than that of this object. eg: we want to copy the values from a two dimensional slice out of a three dimensional object into a two dimensional object. We do this by taking a slice from the other object where one dimension of the slice region is of size 1. So in the above example, we modify the above region like so: <<1,2><0,3><0,3>> and take this slice. More...
 
std::string escript::DataTypes::createShapeErrorMessage (const std::string &messagePrefix, const DataTypes::ShapeType &other, const DataTypes::ShapeType &thisShape)
 Produce a string containing two shapes. More...