Package elki.distance.external
Class FileBasedSparseDoubleDistance.Par
- java.lang.Object
-
- elki.distance.external.FileBasedSparseDoubleDistance.Par
-
- All Implemented Interfaces:
Parameterizer
- Enclosing class:
- FileBasedSparseDoubleDistance
public static class FileBasedSparseDoubleDistance.Par extends java.lang.Object implements Parameterizer
Parameterization class.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static OptionID
DEFAULTDIST_ID
Optional parameter to specify the distance to return when no distance was given in the file.protected double
defaultDistance
Distance to return when not defined otherwise.static OptionID
MATRIX_ID
Parameter that specifies the name of the distance matrix file.protected java.net.URI
matrixfile
Input file.protected DistanceParser
parser
Parser for input file.static OptionID
PARSER_ID
Optional parameter to specify the parsers to provide a database, must extendDistanceParser
.
-
Constructor Summary
Constructors Constructor Description Par()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Parameterization config)
Configure the class.FileBasedSparseDoubleDistance
make()
Make an instance after successful configuration.
-
-
-
Field Detail
-
MATRIX_ID
public static final OptionID MATRIX_ID
Parameter that specifies the name of the distance matrix file.
-
PARSER_ID
public static final OptionID PARSER_ID
Optional parameter to specify the parsers to provide a database, must extendDistanceParser
. If this parameter is not set,AsciiDistanceParser
is used as parser for all input files.
-
DEFAULTDIST_ID
public static final OptionID DEFAULTDIST_ID
Optional parameter to specify the distance to return when no distance was given in the file. Defaults to infinity.
-
matrixfile
protected java.net.URI matrixfile
Input file.
-
parser
protected DistanceParser parser
Parser for input file.
-
defaultDistance
protected double defaultDistance
Distance to return when not defined otherwise.
-
-
Method Detail
-
configure
public void configure(Parameterization config)
Description copied from interface:Parameterizer
Configure the class.Note: the status is collected by the parameterization object, so that multiple errors may arise and be reported in one run.
- Specified by:
configure
in interfaceParameterizer
- Parameters:
config
- Parameterization
-
make
public FileBasedSparseDoubleDistance make()
Description copied from interface:Parameterizer
Make an instance after successful configuration.Note: your class should return the exact type, only this very broad interface should use
Object
as return type.- Specified by:
make
in interfaceParameterizer
- Returns:
- a new instance
-
-