Package repast.simphony.data2
Class AggregateDSCreator
java.lang.Object
repast.simphony.data2.AggregateDSCreator
Creates aggregate DataSources. The data sources produced by this creator are
share a common statistical object such that calling get on one of these is a
record for all of them, until reset is called. Consequently, these assume
that the collection passed will not change between calls to get.
- Author:
- Nick Collier
-
Constructor Summary
ConstructorDescriptionCreates a builder that will create aggregate data sources using the specified DataSource as the source for the non-aggregate data that will then be aggegated. -
Method Summary
Modifier and TypeMethodDescriptionConvenience method for creating a count data source that will return all the objects of a particular type.createDataSource
(String id, AggregateOp type) Creates an AggregateDataSource of the specified type with the specified id.Creates an aggregate data source that will get the geometric mean of the collection of objects passed into it.Creates an aggregate data source that will get the max of the collection of objects passed into it.Creates an aggregate data source that will get the mean of the collection of objects passed into it.Creates an aggregate data source that will get the min of the collection of objects passed into it.Creates an aggregate data source that will get the second moment of the collection of objects passed into it.Creates an aggregate data source that will get the standard deviation of the collection of objects passed into it.Creates an aggregate data source that will get the sum of the logs of the collection of objects passed into it.Creates an aggregate data source that will sum across the collection of objects passed into it.Creates an aggregate data source that will get the sum of the squares of the collection of objects passed into it.Creates an aggregate data source that will get the variance of the collection of objects passed into it.
-
Constructor Details
-
AggregateDSCreator
Creates a builder that will create aggregate data sources using the specified DataSource as the source for the non-aggregate data that will then be aggegated.- Parameters:
source
- the source for the non-aggregate data that will then be aggegated
-
-
Method Details
-
createSumSource
Creates an aggregate data source that will sum across the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will sum across the collection of objects passed into it.
-
createMeanSource
Creates an aggregate data source that will get the mean of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the mean of the collection of objects passed into it.
-
createMinSource
Creates an aggregate data source that will get the min of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the min the collection of objects passed into it.
-
createMaxSource
Creates an aggregate data source that will get the max of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the max the collection of objects passed into it.
-
createStdDevSource
Creates an aggregate data source that will get the standard deviation of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the std dev the collection of objects passed into it.
-
createSumLogsSource
Creates an aggregate data source that will get the sum of the logs of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the sum of the logs the collection of objects passed into it.
-
createSumSquaresSource
Creates an aggregate data source that will get the sum of the squares of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the sum of the squares the collection of objects passed into it.
-
createVarianceSource
Creates an aggregate data source that will get the variance of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the variance the collection of objects passed into it.
-
createGeoMeanSource
Creates an aggregate data source that will get the geometric mean of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the geometric mean the collection of objects passed into it.
-
createSecondMomentSource
Creates an aggregate data source that will get the second moment of the collection of objects passed into it. The id should be unique across the DataSet that this source is added to.- Parameters:
id
- the unique id of the data source.- Returns:
- an aggregate data source that will get the second moment the collection of objects passed into it.
-
createCountSource
Convenience method for creating a count data source that will return all the objects of a particular type.- Parameters:
id
- the unique id of the data source- Returns:
- the created count data source
-
createDataSource
Creates an AggregateDataSource of the specified type with the specified id.- Parameters:
id
-type
-- Returns:
- the created AggregateDataSource.
-