public abstract class ContinuousCoverageDefinition extends BaseCoverageDefinition
A type of coverage definition that provides a convenient way to organize and initialize a coverage calculation, which computes access calculations over a set of grid points. Each access calculation represents a logical operation determining whether a set of constraints are satisfied for geometry involving one grid point and any number of other assets. For more information, see the Coverage section of the documentation.
In contrast to the coverage definitions derived from DiscreteCoverageDefinition
, definitions that derive from this class partition the collection of grid points and
split these groups amongst available computational cores for calculation.
Modifier | Constructor and Description |
---|---|
protected |
ContinuousCoverageDefinition()
Initializes a new instance.
|
protected |
ContinuousCoverageDefinition(ContinuousCoverageDefinition existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForSameDefinition(BaseCoverageDefinition other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected abstract boolean |
checkForSameDefinition(ContinuousCoverageDefinition other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
CoverageResults |
computeCoverageOverTheGrid(JulianDate start,
JulianDate stop)
Computes the
CoverageResults which stores the results of this calculation for the whole grid. |
CoverageResults |
computeCoverageOverTheGrid(JulianDate start,
JulianDate stop,
ITrackCalculationProgress tracker)
Computes the
CoverageResults which stores the results of this calculation for the whole grid. |
CoverageResults |
computeCoverageOverTheGrid(TimeIntervalCollection consideredIntervals)
Computes the
CoverageResults which stores the results of this calculation for the whole grid. |
CoverageResults |
computeCoverageOverTheGrid(TimeIntervalCollection consideredIntervals,
ITrackCalculationProgress tracker)
Computes the
CoverageResults which stores the results of this calculation for the whole grid. |
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
addAsset, addAsset, addAssetRange, checkForSameDefinition, createGridPoint, enumerateDependencies, freezeAggregatedObjects, getAssetDefinitions, getAssets, getFilter, getGrid, getGridPointService, getMultithreadCoverage, removeAllAssets, removeAsset, removeAsset, setAssetDefinitions, setFilter, setGrid, setGridPointService, setMultithreadCoverage, validateProperties
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
protected ContinuousCoverageDefinition()
protected ContinuousCoverageDefinition(@Nonnull ContinuousCoverageDefinition existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.protected final boolean checkForSameDefinition(BaseCoverageDefinition other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class BaseCoverageDefinition
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected abstract boolean checkForSameDefinition(@Nullable ContinuousCoverageDefinition other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
ContinuousCoverageDefinition.checkForSameDefinition(agi.foundation.coverage.BaseCoverageDefinition)
method.computeCurrentDefinitionHashCode
in class BaseCoverageDefinition
public final CoverageResults computeCoverageOverTheGrid(@Nonnull JulianDate start, @Nonnull JulianDate stop)
CoverageResults
which stores the results of this calculation for the whole grid.
Results for each grid point are stored in a CoverageQueryResult
, the collection of which is contained by the overall result.
Call this method after setting up the Grid
(get
/ set
) and adding the desired Assets
(get
) to the definition.start
- The start time of the interval to consider.stop
- The stop time of the interval to consider.PropertyInvalidException
- Thrown if the Grid
(get
/ set
), BaseCoverageDefinition.GridPointService
, or
Filter
(get
/ set
) property is null
.
Also thrown if either GridPointCreationCallback
(get
/ set
) or GridPointPlaceholder
(get
/ set
) is null, depending upon which is relevant.IllegalStateException
- Thrown in several circumstances:
No Assets
(get
) have been specified.
Duplicate Assets
(get
) were specified.
No grid points were generated with the supplied definition of Grid
(get
/ set
).
public final CoverageResults computeCoverageOverTheGrid(@Nonnull JulianDate start, @Nonnull JulianDate stop, ITrackCalculationProgress tracker)
CoverageResults
which stores the results of this calculation for the whole grid.
Results for each grid point are stored in a CoverageQueryResult
, the collection of which is contained by the overall result.
Call this method after setting up the Grid
(get
/ set
) and adding the desired Assets
(get
) to the definition.
If a cancellation request is made on the tracker
during the calculation, the result returned will be null.
start
- The start time of the interval to consider.stop
- The stop time of the interval to consider.tracker
- A tracker which can track the progress of the calculation and provides a way to cancel execution.PropertyInvalidException
- Thrown if the Grid
(get
/ set
), BaseCoverageDefinition.GridPointService
, or
Filter
(get
/ set
) property is null
.
Also thrown if either GridPointCreationCallback
(get
/ set
) or GridPointPlaceholder
(get
/ set
) is null, depending upon which is relevant.IllegalStateException
- Thrown in several circumstances:
No Assets
(get
) have been specified.
Duplicate Assets
(get
) were specified.
No grid points were generated with the supplied definition of Grid
(get
/ set
).
public final CoverageResults computeCoverageOverTheGrid(@Nonnull TimeIntervalCollection consideredIntervals)
CoverageResults
which stores the results of this calculation for the whole grid.
Results for each grid point are stored in a CoverageQueryResult
, the collection of which is contained by the overall result.
Call this method after setting up the Grid
(get
/ set
) and adding the desired Assets
(get
) to the definition.consideredIntervals
- The time intervals to consider for the coverage calculation.PropertyInvalidException
- Thrown if the Grid
(get
/ set
), BaseCoverageDefinition.GridPointService
, or
Filter
(get
/ set
) property is null
.IllegalStateException
- Thrown in several circumstances:
No Assets
(get
) have been specified.
Duplicate Assets
(get
) were specified.
No grid points were generated with the supplied definition of Grid
(get
/ set
).
ArgumentNullException
- Thrown when consideredIntervals
is null
.public final CoverageResults computeCoverageOverTheGrid(@Nonnull TimeIntervalCollection consideredIntervals, @Nullable ITrackCalculationProgress tracker)
CoverageResults
which stores the results of this calculation for the whole grid.
Results for each grid point are stored in a CoverageQueryResult
, the collection of which is contained by the overall result.
Call this method after setting up the Grid
(get
/ set
) and adding the desired Assets
(get
) to the definition.
If a cancellation request is made on the tracker
during the calculation, the result returned will be null.
consideredIntervals
- The time intervals over which coverage is to be computed.tracker
- A tracker which can track the progress of the calculation and provides a way to smoothly cancel execution.PropertyInvalidException
- Thrown when the Grid
(get
/ set
), BaseCoverageDefinition.GridPointService
, or
Filter
(get
/ set
) property is null
.IllegalStateException
- Thrown in several circumstances:
No Assets
(get
) have been specified.
Duplicate Assets
(get
) were specified.
No grid points were generated with the supplied definition of Grid
(get
/ set
).
ArgumentNullException
- Thrown when consideredIntervals
is null
.