Package org.ojalgo.structure
Class Keyed1D<K,N extends java.lang.Comparable<N>>
- java.lang.Object
-
- org.ojalgo.structure.Keyed1D<K,N>
-
- All Implemented Interfaces:
Structure1D
public final class Keyed1D<K,N extends java.lang.Comparable<N>> extends java.lang.Object implements Structure1D
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,B>>, Structure1D.LongIndex, Structure1D.LoopCallback
-
-
Field Summary
Fields Modifier and Type Field Description private Structure1D.IndexMapper<K>
myMapper
private Access1D<N>
myStructure
-
Constructor Summary
Constructors Constructor Description Keyed1D(Access1D<N> structure, Structure1D.IndexMapper<K> indexMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
byteValue(K key)
long
count()
The total number of elements in this structure.double
doubleValue(K key)
float
floatValue(K key)
N
get(K key)
int
intValue(K key)
long
longValue(K key)
void
set(K key, byte value)
void
set(K key, double value)
void
set(K key, float value)
void
set(K key, int value)
void
set(K key, long value)
void
set(K key, short value)
void
set(K key, java.lang.Comparable<?> value)
short
shortValue(K key)
int
size()
The total number of elements in this structure.
-
-
-
Field Detail
-
myMapper
private final Structure1D.IndexMapper<K> myMapper
-
-
Constructor Detail
-
Keyed1D
Keyed1D(Access1D<N> structure, Structure1D.IndexMapper<K> indexMapper)
-
-
Method Detail
-
byteValue
public byte byteValue(K key)
-
count
public long count()
Description copied from interface:Structure1D
The total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
- Specified by:
count
in interfaceStructure1D
-
doubleValue
public double doubleValue(K key)
-
floatValue
public float floatValue(K key)
-
intValue
public int intValue(K key)
-
longValue
public long longValue(K key)
-
set
public void set(K key, byte value)
-
set
public void set(K key, java.lang.Comparable<?> value)
-
set
public void set(K key, double value)
-
set
public void set(K key, float value)
-
set
public void set(K key, int value)
-
set
public void set(K key, long value)
-
set
public void set(K key, short value)
-
shortValue
public short shortValue(K key)
-
size
public int size()
Description copied from interface:Structure1D
The total number of elements in this structure.- Specified by:
size
in interfaceStructure1D
-
-