public class TinInstantiationUtility extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_MEMORY_FRACTION
An arbitrary setting telling how much of the maximum
memory to commit for processing the TIN.
|
static long |
MEMORY_FOR_STANDARD
Measured memory use by Hotspot JVM with a maximum
memory setting smaller than 32 gigabytes,
using object reference compression.
|
static long |
MEMORY_FOR_VIRTUAL
Measured memory use by Hotspot JVM with a maximum
memory setting smaller than 32 gigabytes, using object
reference compression.
|
Constructor and Description |
---|
TinInstantiationUtility(double memoryUseFraction,
int nVertices)
Constructs an instance bases on a specification for how much
memory is available for use and the anticipated number of vertices that
will be added to the TIN.
|
Modifier and Type | Method and Description |
---|---|
IIncrementalTin |
constructInstance(Class<?> tinClass,
double nominalPointSpacing)
Constructs an instance of the specified TIN class.
|
IIncrementalTin |
constructInstance(double nominalPointSpacing)
Uses the information about available memory use that was passed into
the constructor to select a TIN class and construct and instance.
|
Class<?> |
getTinClass()
Get the class that was selected as most appropriate for the available
memory and number of vertices.
|
void |
printSummary(PrintStream ps)
Prints a summary of the size computations and resulting IIncrementalTin
class decision based on information supplied to the constructor.
|
public static final double DEFAULT_MEMORY_FRACTION
public static final long MEMORY_FOR_VIRTUAL
public static final long MEMORY_FOR_STANDARD
public TinInstantiationUtility(double memoryUseFraction, int nVertices)
memoryUseFraction
- the fraction of the JVM total memory that
is allowed for memory use, a value in the range 0 to 1.nVertices
- the number of vertices to be used.public IIncrementalTin constructInstance(Class<?> tinClass, double nominalPointSpacing)
The nominal point spacing should be a rough estimate of the average distance between vertices. This value is used for establishing decision thresholds such as "when are two vertices so close together that they should be treated as one?" and does not need to be especially accurate. As long as it is within an order of magnitude of the true value, the Tinfour algorithms should produce good results.
tinClass
- a valid class reference for an implementation of
IIncrementalTinnominalPointSpacing
- a rough estimate of the average distance
between vertices.public IIncrementalTin constructInstance(double nominalPointSpacing)
The nominal point spacing should be a rough estimate of the average distance between vertices. This value is used for establishing decision thresholds such as "when are two vertices so close together that they should be treated as one?" and does not need to be especially accurate. As long as it is within an order of magnitude of the true value, the Tinfour algorithms should produce good results.
nominalPointSpacing
- a rough estimate of the average distance
between vertices.public void printSummary(PrintStream ps)
ps
- the print stream.public Class<?> getTinClass()
Copyright © 2021. All rights reserved.