L
- The type of Location
F
- The type of FeatureVector
public class LocalFeatureImpl<L extends Location,F extends FeatureVector> extends Object implements LocalFeature<L,F>
LocalFeature
that internally holds
references to a FeatureVector
and Location
.Modifier and Type | Field and Description |
---|---|
F |
feature
The
FeatureVector of the local feature |
L |
location
The
Location of the local feature |
Constructor and Description |
---|
LocalFeatureImpl(L location,
F feature)
Construct the LocalFeatureImpl with the given
Location and
FeatureVector . |
Modifier and Type | Method and Description |
---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
F |
getFeatureVector()
Get the FeatureVector associated with this object.
|
L |
getLocation()
Get the location associated with this object.
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public F extends FeatureVector feature
FeatureVector
of the local featurepublic LocalFeatureImpl(L location, F feature)
Location
and
FeatureVector
.location
- the locationfeature
- the feature vectorpublic void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outpublic void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic void readASCII(Scanner in) throws IOException
ReadableASCII
readASCII
in interface ReadableASCII
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public String asciiHeader()
ReadableASCII
asciiHeader
in interface ReadableASCII
asciiHeader
in interface WriteableASCII
public F getFeatureVector()
FeatureVectorProvider
getFeatureVector
in interface FeatureVectorProvider<F extends FeatureVector>
public L getLocation()
LocationProvider
getLocation
in interface LocationProvider<L extends Location>