public final class Equation extends Object implements Comparable<Equation>, Access1D<Double>, Mutate1D
Access1D.Aggregatable<N extends Number>, Access1D.Collectable<N extends Number,R extends Mutate1D.Receiver<N>>, Access1D.Elements, Access1D.ElementView<N extends Number>, Access1D.IndexOf, Access1D.Sliceable<N extends Number>, Access1D.Visitable<N extends Number>Mutate1D.BiModifiable<N extends Number>, Mutate1D.Fillable<N extends Number>, Mutate1D.Mixable<N extends Number>, Mutate1D.Modifiable<N extends Number>, Mutate1D.Receiver<N extends Number>, Mutate1D.SortableStructure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback| Modifier and Type | Field and Description |
|---|---|
int |
index
The row index of the original body matrix, [A].
|
| Constructor and Description |
|---|
Equation(int row,
long numberOfColumns,
double rhs) |
Equation(int row,
long numberOfColumns,
double rhs,
int numberOfNonzeros) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long index,
double addend) |
void |
add(long index,
Number addend) |
double |
adjust(PhysicalStore<Double> x,
double relaxation)
Will perform a (relaxed) GaussSeidel update.
|
int |
compareTo(Equation other) |
long |
count() |
double |
dot(Access1D<?> vector)
Will calculate and return the dot product of this 1D-structure and another input 1D-vector.
|
double |
doubleValue(long index) |
boolean |
equals(Object obj) |
Double |
get(long index) |
double |
getPivot() |
double |
getRHS() |
int |
hashCode() |
void |
initialise(PhysicalStore<Double> x) |
void |
set(long index,
double value) |
void |
set(long index,
Number value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasCollectable1D, asPrimitive1D, axpy, elements, equals, hashCode, iterator, nonzeros, stream, supplyTo, toRawCopy1D, wrap, wrap, wrap, wrapAccess1D, wrapAccess1D, wrapAccess1DforEach, spliteratorloopAll, loopMatching, loopRange, mapperpublic Equation(int row,
long numberOfColumns,
double rhs)
public Equation(int row,
long numberOfColumns,
double rhs,
int numberOfNonzeros)
public double adjust(PhysicalStore<Double> x, double relaxation)
x - The current solution (one element will be updated)relaxation - Typically 1.0 but could be anything (Most likely should be between 0.0 and 2.0).public int compareTo(Equation other)
compareTo in interface Comparable<Equation>public long count()
count in interface Structure1Dpublic double dot(Access1D<?> vector)
Access1Dpublic double doubleValue(long index)
doubleValue in interface Access1D<Double>public double getPivot()
indexpublic double getRHS()
public void initialise(PhysicalStore<Double> x)
Copyright © 2018 Optimatika. All rights reserved.