Commit Graph

5 Commits

Author SHA1 Message Date
graham
cddce779e8 STYLE: Change to GPL v3 and update copyright date. 2010-04-13 11:38:22 +01:00
graham
abd1ee0f1d ENH: Distribution. Adding operator+ to allow
reduce(dist, sumOp< Distribution<scalar> >());

operations for parallel data.  Combines distributions using the
coarsest binWidth.

Changed write function to write normalised and raw to the same file.

BUG: Distribution. Corrected inaccurate median calculation.
2010-02-11 17:21:16 +00:00
graham
867f419731 ENH: Distribution. Basing the Distribution class on a List instead of
a Map.

Resizing by doubling and mapping data when a new entry is added that
is outside of the current bounds.  Trimming the output (normalised or
raw) to only the entries that contain data.

Overriding List clear method to enable the Distribution to be reset,
but retaining the correct number of components.
2010-02-10 17:50:31 +00:00
graham
844685d29d Finished working version of templated Distribution class.
Changed the underlying map to be a Map<scalar> to allow the addition
of a value to the Distribution to be weighted (by timestep or by cell
size for example) component by-component - default weight is one.

Adding normalisation, write, mean snd median functions.

Test application DistributionTest draws numbers from the Random class
and creates distributions of them, writing to disk, for the main
types: scalar, vector, symmTensior, sphericalTensor and tensor.

Creating a labelVector distibution, but need to check what is
happening to the mean and median values and what happens when an odd
number is used as a binWidth, as truncation to label will be
occurring.
2009-11-23 12:22:13 +00:00
graham
a74f31aace Initial templated Distribution class where a distribution is
accumulated for each component of the template parameter.
2009-11-22 18:21:37 +00:00