Scythe-1.0.3
Classes | Namespaces
datablock.h File Reference

Definitions of internal Matrix data management classes. More...

#include "scythestat/error.h"
Include dependency graph for datablock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  scythe::DataBlock< T_type >
 Handles Matrix data internals. More...
class  scythe::NullDataBlock< T_type >
 Null data block object. More...
class  scythe::DataBlockReference< T_type >
 Handle to DataBlock objects. More...

Namespaces

namespace  scythe
 

The Scythe library namespace.



Detailed Description

Definitions of internal Matrix data management classes.

DataBlock and DataBlockReference objects provide the data half of the data/view container model used by Scythe's matrices. A DataBlock contains a data array of a given type, some information about the DataBlock, and a reference count. Matrix objects provide views to the DataBlock, thus allowing us to provide Matrix objects that reference subsets of other matrices. When no matrices remain that reference the DataBlock the reference count falls to zero and the block is automatically deallocated.

DataBlock uses a simple doubling/halving memory allocation scheme but this may change in later releases.

The DataBlock classes are used exclusively within the library and do not constitute a part of Scythe's public interface.

Based on code in Blitz++ (http://www.oonumerics.org/blitz/) by Todd Veldhuizen <tveldhui@oonumerics.org>. Blitz++ is distributed under the terms of the GNU GPL.