Stay organized with collections Save and categorize content based on your preferences.

SolverVariableValues

public class SolverVariableValues implements ArrayRow.ArrayRowVariables


Store a set of variables and their values in an array-based linked list coupled with a custom hashmap.

Summary

Protected fields

final Cache

Public methods

void
add(SolverVariable v, float value, boolean removeFromDefinition)
void
boolean
void
void
divideByAmount(float amount)
float
get(SolverVariable variable)
int
SolverVariable
getVariable(int index)
float
getVariableValue(int index)
int
void
void
put(SolverVariable variable, float value)
float
remove(SolverVariable v, boolean removeFromDefinition)
int
String
float
use(ArrayRow definition, boolean removeFromDefinition)

Protected fields

mCache

protected final Cache mCache

Public methods

add

public void add(SolverVariable v, float value, boolean removeFromDefinition)

clear

public void clear()

contains

public boolean contains(SolverVariable variable)

display

public void display()

divideByAmount

public void divideByAmount(float amount)

get

public float get(SolverVariable variable)

getCurrentSize

public int getCurrentSize()

getVariable

public SolverVariable getVariable(int index)

getVariableValue

public float getVariableValue(int index)

indexOf

public int indexOf(SolverVariable variable)

invert

public void invert()

put

public void put(SolverVariable variable, float value)

remove

public float remove(SolverVariable v, boolean removeFromDefinition)

sizeInBytes

public int sizeInBytes()

toString

public String toString()

use

public float use(ArrayRow definition, boolean removeFromDefinition)