Package io.bhagat.math.linearalgebra
Class Vector.VectorIndex
- java.lang.Object
-
- io.bhagat.math.linearalgebra.Vector.VectorIndex
-
- Enclosing class:
- Vector
public static class Vector.VectorIndex extends java.lang.Object- Author:
- Bhagat class representing the index and value at a vector
-
-
Constructor Summary
Constructors Constructor Description VectorIndex(int index)Creates a new Vector IndexVectorIndex(int index, double value)Creates a new Vector IndexVectorIndex(int index, double value, Vector parent)Creates a new Vector IndexVectorIndex(int index, Vector parent)Creates a new Vector Index
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIndex()VectorgetParent()doublegetValue()voidsetIndex(int index)voidsetParent(Vector parent)voidsetValue(double value)
-
-
-
Field Detail
-
index
private int index
index in the vector
-
value
private double value
value
-
parent
private Vector parent
the parent vector
-
-
Constructor Detail
-
VectorIndex
public VectorIndex(int index)
Creates a new Vector Index- Parameters:
index- the index
-
VectorIndex
public VectorIndex(int index, double value)Creates a new Vector Index- Parameters:
index- the indexvalue- the value at said index
-
VectorIndex
public VectorIndex(int index, double value, Vector parent)Creates a new Vector Index- Parameters:
index- the indexvalue- the value at said indexparent- the vector holding the VectorIndex
-
VectorIndex
public VectorIndex(int index, Vector parent)Creates a new Vector Index- Parameters:
index- the indexparent- the vector holding the VectorIndex
-
-
Method Detail
-
getIndex
public int getIndex()
- Returns:
- the index
-
setIndex
public void setIndex(int index)
- Parameters:
index- the index to set
-
getValue
public double getValue()
- Returns:
- the value
-
setValue
public void setValue(double value)
- Parameters:
value- the value to set
-
getParent
public Vector getParent()
- Returns:
- the parent
-
setParent
public void setParent(Vector parent)
- Parameters:
parent- the parent to set
-
-