Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.princeton.repeatedgames.rgsolve
Class RGSolveMathematica

    java.lang.Object
      edu.princeton.repeatedgames.rgsolve.RGSolveMathematica

    public class RGSolveMathematica

extends java.lang.Object

These methods return commands for Mathematica and Matlab for finding exact algebraic solutions for V* given an approximate numerical solution. It can also print the system of equations for inclusion in a LaTeX document.

Nested Class Summary
`private static class` | `RGSolveMathematica.SOFTWARE` An enum type for which software to generate code for

Constructor Summary
`private` | `RGSolveMathematica()` private constructor

Method Summary
`private static java.lang.String` | `fracFormat(Fraction frac, boolean isLaTeX)` TODO Put here a description of what this method does.
`private static java.lang.String` | `getEquationSystem(Game game, GameExtremePoint[] V_star, int[] BR1, int[] BR2, RGSolveMathematica.SOFTWARE software)` Returns the command for the the software in `software`'s algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getLatexCommand(Game game, GameExtremePoint[] V_star)` Returns the LaTeX code for the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getLatexCommand(Game game, GameExtremePoint[] V_star, int[] BR1, int[] BR2)` Returns the LaTeX code for the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getMathematicaCommand(Game game, GameExtremePoint[] V_star)` Returns the Mathematica command for the Mathematica algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getMathematicaCommand(Game game, GameExtremePoint[] V_star, int[] BR1, int[] BR2)` Returns the Mathematica command for the Mathematica algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getMatlabCommand(Game game, GameExtremePoint[] V_star)` Returns the Matlab command for the Matlab algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`
`static java.lang.String` | `getMatlabCommand(Game game, GameExtremePoint[] V_star, int[] BR1, int[] BR2)` Returns the Matlab command for the Matlab algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RGSolveMathematica

    private RGSolveMathematica()

  private constructor

Method Detail

### getMathematicaCommand

    public static java.lang.String getMathematicaCommand(Game game,
                                                         GameExtremePoint[] V_star,
                                                         int[] BR1,
                                                         int[] BR2)

  Returns the Mathematica command for the Mathematica algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
    `BR1` - best response vector for player 1
    `BR2` - best response vector for player 2
  Returns:
    A Mathematica command

### getMatlabCommand

    public static java.lang.String getMatlabCommand(Game game,
                                                    GameExtremePoint[] V_star,
                                                    int[] BR1,
                                                    int[] BR2)

  Returns the Matlab command for the Matlab algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
    `BR1` - best response vector for player 1
    `BR2` - best response vector for player 2
  Returns:
    A Matlab command

### getMathematicaCommand

    public static java.lang.String getMathematicaCommand(Game game,
                                                         GameExtremePoint[] V_star)

  Returns the Mathematica command for the Mathematica algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
  Returns:
    A Mathematica command

### getMatlabCommand

    public static java.lang.String getMatlabCommand(Game game,
                                                    GameExtremePoint[] V_star)

  Returns the Matlab command for the Matlab algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
  Returns:
    A Matlab command

### getLatexCommand

    public static java.lang.String getLatexCommand(Game game,
                                                   GameExtremePoint[] V_star)

  Returns the LaTeX code for the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
  Returns:
    A LaTeX equation array

### getLatexCommand

    public static java.lang.String getLatexCommand(Game game,
                                                   GameExtremePoint[] V_star,
                                                   int[] BR1,
                                                   int[] BR2)

  Returns the LaTeX code for the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
    `BR1` - best response vector for player 1
    `BR2` - best response vector for player 2
  Returns:
    A LaTeX equation array

### getEquationSystem

    private static java.lang.String getEquationSystem(Game game,
                                                      GameExtremePoint[] V_star,
                                                      int[] BR1,
                                                      int[] BR2,
                                                      RGSolveMathematica.SOFTWARE software)

  Returns the command for the the software in `software`'s algebraic solver to find the exact solution to the system of equations defining V*, a system derived from the extreme points (and how they are generated) stored in `V_star`

  Parameters:
    `game` - the Game associated with the solution `V_star`
    `V_star` - An array of extreme points representing the approximate solution
    `BR1` - best response vector for player 1
    `BR2` - best response vector for player 2
    `software` - which software to use, Mathematica or Matlab
  Returns:
    a command to solve a system of equations

### fracFormat

    private static java.lang.String fracFormat(Fraction frac,
                                               boolean isLaTeX)

  TODO Put here a description of what this method does.

  Parameters:
    `subtract` -
    `isLaTeX` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD