public class CartPoleState extends InvertedPendulumState
| Modifier and Type | Field and Description |
|---|---|
double |
v |
double |
x |
angle, angleV| Constructor and Description |
|---|
CartPoleState() |
CartPoleState(double x,
double v,
double angle,
double angleV) |
| Modifier and Type | Method and Description |
|---|---|
State |
copy()
Returns a copy of this state suitable for creating state transitions.
|
java.lang.Object |
get(java.lang.Object variableKey)
Returns the value for the given variable key.
|
MutableState |
set(java.lang.Object variableKey,
java.lang.Object value)
Sets the value for the given variable key.
|
java.lang.String |
toString() |
java.util.List<java.lang.Object> |
variableKeys()
Returns the list of state variable keys.
|
public CartPoleState()
public CartPoleState(double x,
double v,
double angle,
double angleV)
public MutableState set(java.lang.Object variableKey, java.lang.Object value)
MutableStateset in interface MutableStateset in class InvertedPendulumStatevariableKey - the key identifier for the variable value to changevalue - the variable value to which the variable should be set.public java.util.List<java.lang.Object> variableKeys()
StatevariableKeys in interface StatevariableKeys in class InvertedPendulumStatepublic java.lang.Object get(java.lang.Object variableKey)
Stateget in interface Stateget in class InvertedPendulumStatevariableKey - the variable keypublic State copy()
StateDeepCopyState or ShallowCopyState annotations. If it is a shallow copy, you should not *directly*
modify any fields of a copied state without copying the fields first, or it could contaminate the state from
which the copy was made. Alternatively, use the MutableState.set(Object, Object) method to modify
ShallowCopyState copied states,
which for ShallowCopyState instances should perform a safe copy-on-write operation.copy in interface Statecopy in class InvertedPendulumStatepublic java.lang.String toString()
toString in class InvertedPendulumState