edu.princeton.repeatedgames.rgsolve.polygon
Class GameExtremePointList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<GameExtremePoint>
edu.princeton.repeatedgames.rgsolve.polygon.GameExtremePointList
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<GameExtremePoint>, java.util.Collection<GameExtremePoint>, java.util.List<GameExtremePoint>, java.util.RandomAccess
public class GameExtremePointList
- extends java.util.ArrayList<GameExtremePoint>
A custom ArrayList
storing GameExtremePoint
that does not allow the addition of null
references
to the list.
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
boolean |
add(GameExtremePoint gep)
Overrides super.add(.) to prevent the addition
of null references to the list |
void |
doContraction(double g1,
double g2,
double discount)
This method contracts all of the points in this list
towards the payoff (g1,g2) using the discount factor
discount, replacing the old points |
GameExtremePointList |
getContractions(double g1,
double g2,
double discount)
This method contracts all of the points in this list
towards the payoff (g1,g2) using the discount factor
discount, and stores the contractions in a new list |
Methods inherited from class java.util.ArrayList |
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
GameExtremePointList
public GameExtremePointList()
getContractions
public GameExtremePointList getContractions(double g1,
double g2,
double discount)
- This method contracts all of the points in this list
towards the payoff (g1,g2) using the discount factor
discount, and stores the contractions in a new list
- Parameters:
g1
- payoff to 1g2
- payoff to 2discount
- discount rate
- Returns:
- A new list storing the contractions of the calling list with (g1,g2)
doContraction
public void doContraction(double g1,
double g2,
double discount)
- This method contracts all of the points in this list
towards the payoff (g1,g2) using the discount factor
discount, replacing the old points
- Parameters:
g1
- payoff to 1g2
- payoff to 2discount
- discount rate
add
public boolean add(GameExtremePoint gep)
- Overrides super.add(.) to prevent the addition
of null references to the list
- Specified by:
add
in interface java.util.Collection<GameExtremePoint>
- Specified by:
add
in interface java.util.List<GameExtremePoint>
- Overrides:
add
in class java.util.ArrayList<GameExtremePoint>