Skip to content

Computation Density Extension

papousek edited this page Nov 19, 2012 · 6 revisions

Description

The extension can spawn new trajectories in the given space and check distance among the trajectories. The provided services are placed in ComputationScope.

Maven Dependency

<dependency>
    <groupId>org.sybila.parasim.extension</groupId>
    <artifactId>computation-density-impl</artifactId>
    <version>${parasim.version}</version>
</dependency>

Usage

public class MyClass {
    @Inject
    private TrajectorySpawner spawner;
    @Inject
    private DistanceChecker checker;

    public void main(OrthogonalSpace space, InitialSampling sampling, ) {
        SpawnedDataBlock spawned = spawned.spawn(space, sampling);
        DistanceMetricDataBlock withDistanceMetrices = withDistanceMetrices(spawned);
        DistanceCheckedDataBlock distanceChecked = checker.check(spawned.getConfiguration(), withDistanceMetrices);
        ...
    }

    private DistanceMetricDataBlock withDistanceMetrices(DataBlock block) {
        ...
    }
}