Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

num_util Namespace Reference


Detailed Description

Members of this namespace come from the num_util project.


Typedefs

typedef std::map< PyArray_TYPES,
char > 
KindCharMap
 Mapping from a PyArray_TYPE to its corresponding typeID in char.
typedef KindCharMap::value_type KindCharMapEntry
typedef std::map< PyArray_TYPES,
std::string
KindStringMap
 Mapping from a PyArray_TYPE to its corresponding name in string.
typedef KindStringMap::value_type KindStringMapEntry
typedef std::map< char, PyArray_TYPES > KindTypeMap
 Mapping from a typeID to its corresponding PyArray_TYPE.
typedef KindTypeMap::value_type KindTypeMapEntry

Functions

numeric::array astype (boost::python::numeric::array arr, PyArray_TYPES t)
 Returns a clone of this array with a new type.
PyArray_TYPES char2type (char e_type)
 Coverts a single character typecode to its PyArray_TYPES.
void check_contiguous (boost::python::numeric::array arr)
 Throws an exception if the array is not contiguous.
void check_contiguous (numeric::array arr)
void check_dim (boost::python::numeric::array arr, int dimnum, int dimsize)
 Throws an exception if a specific dimension from a Numeric array does not match the expected size.
void check_PyArrayElementType (boost::python::object newo)
 Throws an exception if the element of a Numeric array is type casted to PyArray_OBJECT.
void check_PyArrayElementType (object newo)
void check_rank (boost::python::numeric::array arr, int expected_rank)
 Throws an exception if the actual rank is not equal to the expected rank.
void check_shape (boost::python::numeric::array arr, std::vector< int > expected_dims)
 Throws an exception if the actual dimensions of the array are not equal to the expected dimensions.
void check_size (boost::python::numeric::array arr, int expected_size)
 Throw an exception if the actual total size of the array is not equal to the expected size.
void check_size_match (std::vector< int > dims, int n)
 Throws an exception if the total size computed from a vector of integer does not match with the expected size.
void check_type (boost::python::numeric::array arr, PyArray_TYPES expected_type)
 Throws an exception if the actual array type is not equal to the expected type.
boost::python::numeric::array clone (boost::python::numeric::array arr)
 Returns a clone of this array.
numeric::array clone (numeric::array arr)
void copy_data (boost::python::numeric::array arr, char *new_data)
 Copies data into the array.
char * data (boost::python::numeric::array arr)
 Returns a pointer to the data in the array.
char * data (numeric::array arr)
int get_dim (boost::python::numeric::array arr, int dimnum)
 Returns the size of a specific dimension.
bool iscontiguous (boost::python::numeric::array arr)
 Returns true if the array is contiguous.
bool iscontiguous (numeric::array arr)
static KindCharMap kindchars (kindCharMapEntries, kindCharMapEntries+numCharEntries)
static KindStringMap kindstrings (kindStringMapEntries, kindStringMapEntries+numStringEntries)
static KindTypeMap kindtypes (kindTypeMapEntries, kindTypeMapEntries+numTypeEntries)
boost::python::numeric::array makeNum (const boost::python::numeric::array &arr)
 Creates a Numeric array from a Numeric array, referencing the data.
boost::python::numeric::array makeNum (boost::python::object x)
 A free function that extracts a PyArrayObject from any sequential PyObject.
numeric::array makeNum (const numeric::array &arr)
numeric::array makeNum (double *data, std::vector< int > dims)
 Creates a n-dimensional Numeric array with dimensions dims and an array of double.
numeric::array makeNum (float *data, std::vector< int > dims)
 Creates a n-dimensional Numeric array with dimensions dims and an array of float number.
numeric::array makeNum (int *data, std::vector< int > dims)
 Creates a n-dimensional Numeric array with dimensions dims and an array of integer.
numeric::array makeNum (short *data, std::vector< int > dims)
 Creates a n-dimensional Numeric array with dimensions dims and an array of 16-bits.
numeric::array makeNum (char *data, std::vector< int > dims)
 Creates a n-dimensional Numeric array with dimensions dims and an array of 8-bits.
numeric::array makeNum (double *data, int n=0)
 Creates an one-dimensional Numeric array from a double array of size n.
numeric::array makeNum (float *data, int n=0)
 Creates an one-dimensional Numeric array from a float array of size n.
numeric::array makeNum (int *data, int n=0)
 Creates an one-dimensional Numeric array from an integer array of size n.
numeric::array makeNum (std::vector< int > dimens, PyArray_TYPES t=PyArray_DOUBLE)
 Creates a n-dimensional Numeric array with dimensions dimens and Numeric type t.
numeric::array makeNum (int n, PyArray_TYPES t=PyArray_DOUBLE)
 Creates an one-dimensional Numeric array of length n and Numeric type t.
numeric::array makeNum (object x)
int rank (boost::python::numeric::array arr)
 A free function that retrieves the number of dimensions of a Numeric array.
int rank (numeric::array arr)
int refcount (boost::python::numeric::array arr)
 Returns the reference count of the array.
int refcount (numeric::array arr)
void savespace (boost::python::numeric::array arr, bool set_savespace)
 Changes the savespace property of the array.
void savespace (numeric::array arr, bool set_savespace=true)
std::vector< int > shape (boost::python::numeric::array arr)
 Returns the dimensions in a vector.
std::vector< int > shape (numeric::array arr)
int size (boost::python::numeric::array arr)
 A free function that returns the total size of the array.
int size (numeric::array arr)
bool spacesaver (boost::python::numeric::array arr)
 Returns true if the array is a spacesaver array.
bool spacesaver (numeric::array arr)
std::vector< int > strides (boost::python::numeric::array arr)
 Returns the strides array in a vector of integer.
std::vector< int > strides (numeric::array arr)
PyArray_TYPES type (boost::python::numeric::array arr)
 A free function that retrieves the Numeric type of a Numeric array.
PyArray_TYPES type (numeric::array arr)
char type2char (PyArray_TYPES t_type)
 Converts a PyArray_TYPE to its single character typecode.
std::string type2string (PyArray_TYPES t_type)
 Converts a PyArray_TYPE to its name in string.
template<class T>
std::string vector_str (const std::vector< T > &vec)
 Constructs a string which contains a list of elements extracted from the input vector.

Variables

KindCharMapEntry kindCharMapEntries []
KindStringMapEntry kindStringMapEntries []
KindTypeMapEntry kindTypeMapEntries []
int numCharEntries = sizeof(kindCharMapEntries)/sizeof(KindCharMapEntry)
int numStringEntries = sizeof(kindStringMapEntries)/sizeof(KindStringMapEntry)
int numTypeEntries = sizeof(kindTypeMapEntries)/sizeof(KindTypeMapEntry)


Typedef Documentation

typedef std::map<PyArray_TYPES, char> num_util::KindCharMap
 

Mapping from a PyArray_TYPE to its corresponding typeID in char.

Definition at line 300 of file num_util.h.

typedef KindCharMap::value_type num_util::KindCharMapEntry
 

Definition at line 27 of file num_util.cpp.

typedef std::map<PyArray_TYPES, std::string> num_util::KindStringMap
 

Mapping from a PyArray_TYPE to its corresponding name in string.

Definition at line 295 of file num_util.h.

typedef KindStringMap::value_type num_util::KindStringMapEntry
 

Definition at line 9 of file num_util.cpp.

typedef std::map<char, PyArray_TYPES> num_util::KindTypeMap
 

Mapping from a typeID to its corresponding PyArray_TYPE.

Definition at line 305 of file num_util.h.

typedef KindTypeMap::value_type num_util::KindTypeMapEntry
 

Definition at line 43 of file num_util.cpp.


Function Documentation

boost::python::numeric::array num_util::astype boost::python::numeric::array  arr,
PyArray_TYPES  t
 

Returns a clone of this array with a new type.

Parameters:
arr a Boost/Python numeric array.
t PyArray_TYPES of the output array.
Returns:
a replicate of 'arr' with type set to 't'.

Definition at line 347 of file num_util.cpp.

References type2char().

PyArray_TYPES num_util::char2type char  e_type  ) 
 

Coverts a single character typecode to its PyArray_TYPES.

Parameters:
e_type a PyArray_TYPES typecode in char.
Returns:
its corresponding PyArray_TYPES.

Definition at line 415 of file num_util.cpp.

References kindtypes().

Referenced by type().

void num_util::check_contiguous boost::python::numeric::array  arr  ) 
 

Throws an exception if the array is not contiguous.

Parameters:
arr a Boost/Python numeric array.
Returns:
-----

void num_util::check_contiguous numeric::array  arr  ) 
 

Definition at line 312 of file num_util.cpp.

References iscontiguous().

void num_util::check_dim boost::python::numeric::array  arr,
int  dimnum,
int  dimsize
 

Throws an exception if a specific dimension from a Numeric array does not match the expected size.

Parameters:
arr a Boost/Python numeric array.
dimnum an integer that specifies which dimension of 'arr' to check.
dimsize an expected size of the specified dimension.
Returns:
-----

Definition at line 293 of file num_util.cpp.

References shape().

void num_util::check_PyArrayElementType boost::python::object  newo  ) 
 

Throws an exception if the element of a Numeric array is type casted to PyArray_OBJECT.

Parameters:
newo a Boost/Python object.
Returns:
-----

void num_util::check_PyArrayElementType object  newo  ) 
 

Definition at line 393 of file num_util.cpp.

Referenced by makeNum().

void num_util::check_rank boost::python::numeric::array  arr,
int  expected_rank
 

Throws an exception if the actual rank is not equal to the expected rank.

Parameters:
arr a Boost/Python numeric array.
expected_rank an expected rank of the numeric array.
Returns:
-----

Definition at line 220 of file num_util.cpp.

References rank().

void num_util::check_shape boost::python::numeric::array  arr,
std::vector< int >  expected_dims
 

Throws an exception if the actual dimensions of the array are not equal to the expected dimensions.

Parameters:
arr a Boost/Python numeric array.
expected_dims an integer vector of expected dimension.
Returns:
-----

Definition at line 281 of file num_util.cpp.

References shape(), and vector_str().

void num_util::check_size boost::python::numeric::array  arr,
int  expected_size
 

Throw an exception if the actual total size of the array is not equal to the expected size.

Parameters:
arr a Boost/Python numeric array.
expected_size the expected size of an array.
Returns:
-----

Definition at line 241 of file num_util.cpp.

References size().

Referenced by from_python_sequence< ContainerType, ConversionPolicy >::convertible().

void num_util::check_size_match std::vector< int >  dims,
int  n
[inline]
 

Throws an exception if the total size computed from a vector of integer does not match with the expected size.

Parameters:
dims an integer vector of dimensions.
n an expected size.
Returns:
-----

Definition at line 432 of file num_util.cpp.

void num_util::check_type boost::python::numeric::array  arr,
PyArray_TYPES  expected_type
 

Throws an exception if the actual array type is not equal to the expected type.

Parameters:
arr a Boost/Python numeric array.
expected_type an expected Numeric type.
Returns:
-----

Definition at line 198 of file num_util.cpp.

References kindstrings(), and type().

boost::python::numeric::array num_util::clone boost::python::numeric::array  arr  ) 
 

Returns a clone of this array.

Parameters:
arr a Boost/Python numeric array.
Returns:
a replicate of the Boost/Python numeric array.

numeric::array num_util::clone numeric::array  arr  ) 
 

Definition at line 340 of file num_util.cpp.

References makeNum().

void num_util::copy_data boost::python::numeric::array  arr,
char *  new_data
 

Copies data into the array.

Parameters:
arr a Boost/Python numeric array.
new_data a char pointer referencing the new data.
Returns:
-----

Definition at line 330 of file num_util.cpp.

References data().

char* num_util::data boost::python::numeric::array  arr  ) 
 

Returns a pointer to the data in the array.

Parameters:
arr a Boost/Python numeric array.
Returns:
a char pointer pointing at the first element of the array.

char* num_util::data numeric::array  arr  ) 
 

Definition at line 321 of file num_util.cpp.

Referenced by copy_data(), NTupleXML::createChildren2D(), RootNTuple::doubleArrayAt(), RootNTuple::fillDataCache(), RootNTuple::floatArrayAt(), StHist2DProjector::getAverage(), MapMatrixProjector::getAverage(), Map1Projector::getAverage(), RootNTuple::getType(), RootNTuple::intArrayAt(), and NTuple::sum().

int num_util::get_dim boost::python::numeric::array  arr,
int  dimnum
 

Returns the size of a specific dimension.

Parameters:
arr a Boost/Python numeric array.
dimnum an integer that identifies the dimension to retrieve.
Returns:
the size of the requested dimension.

Definition at line 267 of file num_util.cpp.

References rank(), and shape().

bool num_util::iscontiguous boost::python::numeric::array  arr  ) 
 

Returns true if the array is contiguous.

Parameters:
arr a Boost/Python numeric array.
Returns:
true if the array is contiguous, false otherwise.

bool num_util::iscontiguous numeric::array  arr  ) 
 

Definition at line 306 of file num_util.cpp.

Referenced by check_contiguous().

static KindCharMap num_util::kindchars kindCharMapEntries  ,
kindCharMapEntries numCharEntries
[static]
 

Referenced by type2char().

static KindStringMap num_util::kindstrings kindStringMapEntries  ,
kindStringMapEntries numStringEntries
[static]
 

Referenced by check_type(), and type2string().

static KindTypeMap num_util::kindtypes kindTypeMapEntries  ,
kindTypeMapEntries numTypeEntries
[static]
 

Referenced by char2type().

boost::python::numeric::array num_util::makeNum const boost::python::numeric::array &  arr  ) 
 

Creates a Numeric array from a Numeric array, referencing the data.

Parameters:
arr a Boost/Python numeric array.
Returns:
a numeric array referencing the input array.

boost::python::numeric::array num_util::makeNum boost::python::object  x  ) 
 

A free function that extracts a PyArrayObject from any sequential PyObject.

Parameters:
x a sequential PyObject wrapped in a Boost/Python 'object'.
Returns:
a PyArrayObject wrapped in Boost/Python numeric array.

numeric::array num_util::makeNum const numeric::array &  arr  ) 
 

Definition at line 188 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum double *  data,
std::vector< int >  dims
 

Creates a n-dimensional Numeric array with dimensions dims and an array of double.

Parameters:
data an array of double.
dims a vector of interger to represent the dimensions of the array.
Returns:
a numeric array of shape dims with elements initialized to data.

Definition at line 175 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum float *  data,
std::vector< int >  dims
 

Creates a n-dimensional Numeric array with dimensions dims and an array of float number.

Parameters:
data an array of float.
dims a vector of interger to represent the dimensions of the array.
Returns:
a numeric array of shape dims with elements initialized to data.

Definition at line 162 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum int *  data,
std::vector< int >  dims
 

Creates a n-dimensional Numeric array with dimensions dims and an array of integer.

Parameters:
data an array of integer.
dims a vector of interger to represent the dimensions of the array.
Returns:
a numeric array of shape dims with elements initialized to data.

Definition at line 149 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum short *  data,
std::vector< int >  dims
 

Creates a n-dimensional Numeric array with dimensions dims and an array of 16-bits.

Parameters:
data an array of short integers.
dims a vector of interger to represent the dimensions of the array.
Returns:
a numeric array of shape dims with elements initialized to data.

Definition at line 136 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum char *  data,
std::vector< int >  dims
 

Creates a n-dimensional Numeric array with dimensions dims and an array of 8-bits.

Parameters:
data an array of characters.
dims a vector of interger to represent the dimensions of the array.
Returns:
a numeric array of shape dims with elements initialized to data.

Definition at line 123 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum double *  data,
int  n
 

Creates an one-dimensional Numeric array from a double array of size n.

Parameters:
data an array of double.
n an integer indicates the size of the array.
Returns:
a Numeric array of size n with elements initialized to data.

Definition at line 116 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum float *  data,
int  n
 

Creates an one-dimensional Numeric array from a float array of size n.

Parameters:
data an array of float.
n an integer indicates the size of the array.
Returns:
a Numeric array of size n with elements initialized to data.

Definition at line 109 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum int *  data,
int  n
 

Creates an one-dimensional Numeric array from an integer array of size n.

Parameters:
data an array of integer.
n an integer indicates the size of the array.
Returns:
a Numeric array of size n with elements initialized to data.

Definition at line 101 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum std::vector< int >  dimens,
PyArray_TYPES  t
 

Creates a n-dimensional Numeric array with dimensions dimens and Numeric type t.

The elements of the array are initialized to zero.

Parameters:
dimens a vector of interger specifies the dimensions of the array.
t elements' Numeric type. Default is double.
Returns:
a numeric array of shape dimens with elements initialized to zero.

Definition at line 95 of file num_util.cpp.

boost::python::numeric::array num_util::makeNum int  n,
PyArray_TYPES  t
 

Creates an one-dimensional Numeric array of length n and Numeric type t.

The elements of the array are initialized to zero.

Parameters:
n an integer representing the length of the array.
t elements' Numeric type. Default is double.
Returns:
a numeric array of size n with elements initialized to zero.

Definition at line 89 of file num_util.cpp.

numeric::array num_util::makeNum object  x  ) 
 

Definition at line 77 of file num_util.cpp.

References check_PyArrayElementType().

Referenced by clone(), PyDataSource::columnAsNumArray(), and QtRootNTuple::valueAt().

int num_util::rank boost::python::numeric::array  arr  ) 
 

A free function that retrieves the number of dimensions of a Numeric array.

Parameters:
arr a Boost/Python numeric array.
Returns:
an integer that indicates the rank of an array.

int num_util::rank numeric::array  arr  ) 
 

Definition at line 212 of file num_util.cpp.

Referenced by check_rank(), get_dim(), RTuple::operator[](), NTuple::operator[](), shape(), and strides().

int num_util::refcount boost::python::numeric::array  arr  ) 
 

Returns the reference count of the array.

Parameters:
arr a Boost/Python numeric array.
Returns:
the reference count of the array.

int num_util::refcount numeric::array  arr  ) 
 

Definition at line 389 of file num_util.cpp.

void num_util::savespace boost::python::numeric::array  arr,
bool  set_savespace
 

Changes the savespace property of the array.

Parameters:
arr a Boost/Python numeric array.
set_savespace a boolean value. Default is true.
Returns:
-----

void num_util::savespace numeric::array  arr,
bool  set_savespace = true
 

Definition at line 359 of file num_util.cpp.

std::vector<int> num_util::shape boost::python::numeric::array  arr  ) 
 

Returns the dimensions in a vector.

Parameters:
arr a Boost/Python numeric array.
Returns:
a vector with integer values that indicates the shape of the array.

std::vector<int> num_util::shape numeric::array  arr  ) 
 

Definition at line 253 of file num_util.cpp.

References rank().

Referenced by check_dim(), check_shape(), PyDataSource::columnAsNumArray(), ContourPointRep::createContours(), MapMatrixProjector::fillDataSource(), Bins2DProfile::fillDataSource(), Bins2DHist::fillDataSource(), MapMatrixProjector::fillProjectedValues(), Bins2DProfile::fillProjectedValues(), Bins2DHist::fillProjectedValues(), get_dim(), NTupleController::readAsciiNTuple(), and QtRootNTuple::valueAt().

int num_util::size boost::python::numeric::array  arr  ) 
 

A free function that returns the total size of the array.

Parameters:
arr a Boost/Python numeric array.
Returns:
an integer that indicates the total size of the array.

int num_util::size numeric::array  arr  ) 
 

Definition at line 232 of file num_util.cpp.

Referenced by NTupleProjector::acceptRow(), NumArrayTuple::addColumn(), NTuple::addColumn(), NTuple::addRow(), QtCut::addTargets(), Inspector::availPlotTypesActivated(), MinuitMigrad::calcBestFit(), MinuitMigrad::calcCovariance(), check_size(), XyPlotter::checkAutoScale(), MinuitMigrad::checkIndex(), Inspector::clearNewBindings(), FigureEditor::contentsMouseMoveEvent(), RTuple::copy(), NTuple::copy(), RootNTuple::createBinding(), AxisModelXML::createChildren(), NTupleXML::createChildren2D(), NTupleProjectorXML::createElement(), FunctionProjectorXML::createElement(), BinToColorXML::createElement(), Map2Projector::createNTuple(), FunctionProjector::createNTuple(), FunctionController::createNTuple(), FitsController::createNTuple(), Bins2DProfile::createNTuple(), Bins2DHist::createNTuple(), Bins1DProfile::createNTuple(), Bins1DHist::createNTuple(), PointRepXML::createObject(), CompositePlotter::createPickTuple(), Inspector::cutAddAll(), NTupleProjector::dataRangeWithError(), EpsView::draw_Text(), DrawBorder::drawKnob(), QtViewImp::drawMethod(), CompositePlotter::drawProjValues(), QtViewImp::drawViewMethod(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYTickLabels(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), FunctionController::ellipse(), ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), RootNTuple::expandIfNeeded(), extractVector(), CompositePlotter::fillCutList(), RootNTuple::fillDataCache(), FitsNTuple::fillDataCache(), Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), Map1Projector::fillDataSource(), StatedFCN::fillFreeDerivatives(), StatedFCN::fillFreeParameters(), QtXmlElement::fillNodeList(), StripChartProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), DataSource::fillRange(), Inspector::findCutIndex(), XyPlotter::getAspectRatio(), NTupleProjector::getAverage(), MapMatrixProjector::getAverage(), Map1Projector::getAverage(), DyHist1DProjector::getAverage(), Inspector::getAxes(), NTupleProjector::getAxisBindings(), NTuple::getColumn(), DataSource::getColumn(), DataSourceController::getDataSource(), NTupleProjector::getNTupleAfterCuts(), RootController::getNTupleNames(), NumArrayTuple::getNumArray(), StatedFCN::getNumberFreeParms(), NTupleProjector::getNumberOfEntries(), NTupleXML::getObject(), Fitter::getParameterIndex(), NTupleProjector::getPos(), NTupleProjector::getPosWithError(), NumArrayTuple::getRow(), ListTuple::getRow(), RootNTuple::getRow(), FitsNTuple::getRow(), CanvasView::getSelectedPlotters(), CompositePlotter::getTarget(), DisplayController::getValueTransformIndex(), MapMatrixProjector::getZValue(), Map3Projector::getZValue(), CompositePlotter::indexOf(), DataSourceController::indexOfDataSource(), DataSource::indexOfMaxElement(), DataSource::indexOfMinElement(), Inspector::init(), FitsNTuple::initColumns(), MinuitMigrad::initialize(), FigureEditor::initPrinter(), NTupleProjector::inRange(), CanvasView::invalidImageFormatError(), ListTuple::isAcceptable(), DataSource::isValidColumn(), WindowController::newWindow(), NTuple::NTuple(), Inspector::ntupleChanged(), NTuplePearsonFCN::objectiveValue(), RTuple::operator[](), NTuple::operator[](), PickTable::PickTable(), WindowController::positionCanvas(), WindowController::positionInspector(), XyPlotter::prepareToDraw(), QtDisplay::QtDisplay(), NTupleController::readAsciiNTuple(), PickTable::refreshItems(), NumArrayTuple::replaceColumn(), NTuple::replaceColumn(), ListTuple::replaceColumn(), RootNTuple::replaceColumn(), FitsNTuple::replaceColumn(), CanvasWindow::resetFontSize(), WindowController::resizeCanvas(), NumArrayTuple::rows(), NTuple::rows(), ListTuple::rows(), RTuple::RTuple(), NTupleController::saveNTuples(), FunctionProjectorXML::setAttributes(), FontXML::setAttributes(), NTupleProjector::setAxisBindings(), Bins1DHist::setBinContents(), CutPlotter::setCuts(), NTupleFCN::setDataSource(), StatedFCN::setFreeParameters(), StatedFCN::setFunction(), MapMatrixProjector::setNTuple(), Inspector::setParameters(), FunctionProjector::setPrincipleErrors(), NumArrayTuple::setShape(), ListTuple::setShape(), RootNTuple::setShape(), FitsNTuple::setShape(), DataSource::setShape(), PlotterBase::setTicks(), PlotterBase::setTicksOnX(), DataSource::sum(), Inspector::symbolPointSize_returnPressed(), DataSource::throwIfInvalidRowSize(), Inspector::titleText_returnPressed(), CanvasView::toLower(), QtViewImp::transformAndFill(), Inspector::updateCutControls(), Inspector::updateErrorEllipseTab(), Inspector::updatePlotTypes(), Inspector::updateSelectedPlotDataSource(), Inspector::updateTupleCuts(), NumArrayTuple::valueAt(), and ListTuple::valueAt().

bool num_util::spacesaver boost::python::numeric::array  arr  ) 
 

Returns true if the array is a spacesaver array.

Parameters:
arr a Boost/Python numeric array.
Returns:
true if the array is a spacesaver array, false otherwise.

bool num_util::spacesaver numeric::array  arr  ) 
 

Definition at line 351 of file num_util.cpp.

std::vector<int> num_util::strides boost::python::numeric::array  arr  ) 
 

Returns the strides array in a vector of integer.

Parameters:
arr a Boost/Python numeric array.
Returns:
the strides of an array.

std::vector<int> num_util::strides numeric::array  arr  ) 
 

Definition at line 375 of file num_util.cpp.

References rank().

PyArray_TYPES num_util::type boost::python::numeric::array  arr  ) 
 

A free function that retrieves the Numeric type of a Numeric array.

Parameters:
arr a Boost/Python numeric array.
Returns:
the Numeric type of the array's elements

PyArray_TYPES num_util::type numeric::array  arr  ) 
 

Definition at line 194 of file num_util.cpp.

References char2type().

Referenced by DisplayController::addLineRep(), check_type(), FitsController::checkForImage(), hippodraw::Axes::convert(), DataRepXML::createDataRep(), TransformXML::createElement(), BinsBaseXML::createElement(), PlotterBaseXML::createFontElements(), TransformXML::createObject(), PointRepXML::createObject(), DataRepXML::createObject(), BinToColorXML::createObject(), BinsBaseXML::createObject(), BinnerAxisXML::createObject(), PlotterBaseXML::createPlotter(), CanvasWindow::customEvent(), FitsFile::fillDoubleVectorFromColumn(), PlotterBase::getBinWidth(), FitsFileBase::getImageType(), DataRep::getMean(), PlotterBase::getOffset(), QtDisplay::getRange(), DataRep::getRMS(), PlotTable::initialize(), PickTable::PickTable(), RootBranch::RootBranch(), BinnerAxisXML::setAttributes(), QtDisplay::setAutoRanging(), PlotterBase::setAutoTicks(), PyDataRep::setBinWidth(), QtCut::setCutRange(), PlotterBase::setLabel(), QtDisplay::setLog(), DisplayController::setLog(), QtDisplay::setOffset(), PlotterBase::setRange(), PlotterBase::setTicks(), and QtRootNTuple::valueAt().

char num_util::type2char PyArray_TYPES  t_type  ) 
 

Converts a PyArray_TYPE to its single character typecode.

Parameters:
t_type a PyArray_TYPES.
Returns:
the corresponding typecode in char.

Definition at line 411 of file num_util.cpp.

References kindchars().

Referenced by astype().

std::string num_util::type2string PyArray_TYPES  t_type  ) 
 

Converts a PyArray_TYPE to its name in string.

Parameters:
t_type a PyArray_TYPES.
Returns:
the corresponding name in string.

Definition at line 407 of file num_util.cpp.

References kindstrings().

template<class T>
std::string num_util::vector_str const std::vector< T > &  vec  )  [inline]
 

Constructs a string which contains a list of elements extracted from the input vector.

Parameters:
vec a vector of any type.
Returns:
a string that lists the elements from the input vector.

Definition at line 420 of file num_util.cpp.

Referenced by check_shape().


Variable Documentation

KindCharMapEntry num_util::kindCharMapEntries[]
 

Initial value:

  {
    KindCharMapEntry(PyArray_CHAR,   'c'),
    KindCharMapEntry(PyArray_UBYTE,  'b'),
    KindCharMapEntry(PyArray_SBYTE,  '1'),
    KindCharMapEntry(PyArray_SHORT,  's'),
    KindCharMapEntry(PyArray_INT,    'i'),
    KindCharMapEntry(PyArray_LONG,   'l'),
    KindCharMapEntry(PyArray_FLOAT,  'f'),
    KindCharMapEntry(PyArray_DOUBLE, 'd'),
    KindCharMapEntry(PyArray_CFLOAT, 'F'),
    KindCharMapEntry(PyArray_CDOUBLE,'D'),
    KindCharMapEntry(PyArray_OBJECT, 'O')
  }

Definition at line 28 of file num_util.cpp.

KindStringMapEntry num_util::kindStringMapEntries[]
 

Initial value:

  {
    KindStringMapEntry(PyArray_CHAR,   "PyArray_CHAR"),
    KindStringMapEntry(PyArray_UBYTE,  "PyArray_UBYTE"),
    KindStringMapEntry(PyArray_SBYTE,  "PyArray_SBYTE"),
    KindStringMapEntry(PyArray_SHORT,  "PyArray_SHORT"),
    KindStringMapEntry(PyArray_INT,    "PyArray_INT"),
    KindStringMapEntry(PyArray_LONG,   "PyArray_LONG"),
    KindStringMapEntry(PyArray_FLOAT,  "PyArray_FLOAT"),
    KindStringMapEntry(PyArray_DOUBLE, "PyArray_DOUBLE"),
    KindStringMapEntry(PyArray_CFLOAT, "PyArray_CFLOAT"),
    KindStringMapEntry(PyArray_CDOUBLE,"PyArray_CDOUBLE"),
    KindStringMapEntry(PyArray_OBJECT, "PyArray_OBJECT"),

    KindStringMapEntry(PyArray_NOTYPE ,"PyArray_NOTYPE")
  }

Definition at line 10 of file num_util.cpp.

KindTypeMapEntry num_util::kindTypeMapEntries[]
 

Initial value:

  {
    KindTypeMapEntry('c',PyArray_CHAR),
    KindTypeMapEntry('b',PyArray_UBYTE),
    KindTypeMapEntry('1',PyArray_SBYTE),
    KindTypeMapEntry('s',PyArray_SHORT),
    KindTypeMapEntry('i',PyArray_INT),
    KindTypeMapEntry('l',PyArray_LONG),
    KindTypeMapEntry('f',PyArray_FLOAT),
    KindTypeMapEntry('d',PyArray_DOUBLE),
    KindTypeMapEntry('F',PyArray_CFLOAT),
    KindTypeMapEntry('D',PyArray_CDOUBLE),
    KindTypeMapEntry('O',PyArray_OBJECT)
  }

Definition at line 44 of file num_util.cpp.

int num_util::numCharEntries = sizeof(kindCharMapEntries)/sizeof(KindCharMapEntry)
 

Definition at line 61 of file num_util.cpp.

int num_util::numStringEntries = sizeof(kindStringMapEntries)/sizeof(KindStringMapEntry)
 

Definition at line 60 of file num_util.cpp.

int num_util::numTypeEntries = sizeof(kindTypeMapEntries)/sizeof(KindTypeMapEntry)
 

Definition at line 62 of file num_util.cpp.


Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3