Package com.luciad.network.graph.numeric
Class TLcdNumericGraphDecoder
java.lang.Object
com.luciad.network.graph.numeric.TLcdNumericGraphDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
Decoder for decoding numeric graphs, encoded by the
TLcdNumericGraphEncoder
.
Lazy loading
This decoder supports lazily loading and soft-referencing: all partitions that have been saved to a separate file (seeTLcdNumericGraphEncoder
for more information on how
the splitting is done) will be lazily loaded when first needed, and kept in memory using a
SoftReference
to allow reclaiming memory when no longer needed. Whenever a partition has
been changed, it will be locked in memory until it has been written to disk
again.
Notes on thread safety
- This model decoder can be used safely in a multi-threading environment.
- Since:
- 9.1
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a newcom.luciad.network.graph.numeric.TLcdNumericGraphDecoder
instance. -
Method Summary
Modifier and TypeMethodDescriptiondecodeGraph
(String aGraphTopologySource) Decodes the specified graph.decodeGraph
(String aGraphTopologySource, String aGraphEdgeValuesSource) Decodes the specified graph with corresponding edge values.Returns thecom.luciad.io.ILcdInputStreamFactory
that is used for creating input streams in this decoder.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets theILcdInputStreamFactory
that will be used for creating input streams in this decoder.
-
Constructor Details
-
TLcdNumericGraphDecoder
public TLcdNumericGraphDecoder()Creates a newcom.luciad.network.graph.numeric.TLcdNumericGraphDecoder
instance.
-
-
Method Details
-
getInputStreamFactory
Returns thecom.luciad.io.ILcdInputStreamFactory
that is used for creating input streams in this decoder.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used for creating input streams in this decoder.
- See Also:
-
setInputStreamFactory
Sets theILcdInputStreamFactory
that will be used for creating input streams in this decoder.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory that will be used for creating input streams in this decoder.- See Also:
-
decodeGraph
Decodes the specified graph. The graph will be unweighted.- Parameters:
aGraphTopologySource
- the source name of the base file of the graph to be decoded.- Returns:
- the decoded numeric graph.
- Throws:
IOException
- if an I/O exception occurs during decoding.
-
decodeGraph
public TLcdNumericGraph decodeGraph(String aGraphTopologySource, String aGraphEdgeValuesSource) throws IOException Decodes the specified graph with corresponding edge values.- Parameters:
aGraphTopologySource
- the source name of the base topology file of the graph to be decoded.aGraphEdgeValuesSource
- the source name of the base edge value file of the graph to be decoded.- Returns:
- the decoded numeric graph.
- Throws:
IOException
- if an I/O exception occurs during decoding.
-