Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cgsuite.basics.* (7)cgsuite.extras.* (10)cgsuite.plugin.* (19)cgsuite.ui.* (27)
cgsuite.util.* (2)

cgsuite: Javadoc index of package cgsuite.


Package Samples:

cgsuite.basics: Contains the core Combinatorial Game Suite library.  
cgsuite.extras: Contains the core Combinatorial Game Suite library.  
cgsuite.plugin: Contains the core Combinatorial Game Suite library.  
cgsuite.ui: Contains the core Combinatorial Game Suite library.  
cgsuite.util

Classes:

LoopyGame: An arbitrary loopy game, represented by an explicit game digraph. Combinatorial Game Suite contains substantial support for loopy games with finite game graphs. Such games are represented internally by a digraph , a directed graph with separate left and right edges. Most of the theory concerning loopy games can be found in Chapter 11 of Winning Ways, and many of the algorithms employed here are adapted from that presentation. Since instances of Game must be immutable, and since loopy games obviously cannot be built up recursively, construction of LoopyGame instances is handled by the auxiliary ...
MethodInfo: Specifies a Combinatorial Game Suite method. Instances of this class are passed to PluginContext.declareMethod 55 in order to expose methods to the Combinatorial Game Suite interface. Every method recognized by the CGSuite interface is associated to an underlying Java method. When the user enters a method call, the parameters are passed along to the associated Java method. A MethodInfo contains information needed to translate between the CGSuite method call and the associated Java method. The name 55 field specifies the name of the method, as it appears inside the interface. The methodInvoker 55 ...
StyledTextOutput: An abstract representation of styled character data. Each StyledTextOutput contains a body of text marked up with abstract attributes. It can be converted to plain text, LaTeX source, or a screen image, and the interpretation of the abstract attributes varies depending on the form of output being generated. For example, the subscript attribute is ignored when generating plain text. Text can be marked up with style attributes, such as location and size modifiers, as well as an attribute restricting the output modes under which that text is displayed. This makes it possible to specify alternate representations ...
StopperSidedGame: A game whose onside and offside are stoppers. Performing calculations directly on the game graphs of loopy games is nearly intractable. Fortunately, most loopy games have onsides and offsides which are stoppers, and this class provides a way to calculate with a loopy game's onside and offside, rather than directly with its game graph. For example, to calculate the sum of several loopy games, it is far more efficient to convert each component to a StopperSidedGame by calling LoopyGame.sidle 55 , and then sum up the resulting StopperSidedGame s. The downside of this is that there is no way to recover ...
CanonicalGame: A short combinatorial game in canonical form. Every option of a CanonicalGame is again a CanonicalGame . In addition, it is guaranteed that: There are no dominated options. That is, if G and H are left options of the same CanonicalGame , it is guaranteed that G is not less than or equal to H, and likewise for right options. There are no reversible options. That is, if H is a left option of a CanonicalGame G, then no right option of H is less than or equal to G. Likewise, if H is a right option of G, then no left option of H is greater than or equal to G. The CanonicalGame class guarantees that ...
Grid: A two-dimensional array suitable for representing grid-based games. The array is stored in a compact, memory-efficient structure. In addition, several utilities are provided, including methods to decompose a grid into its connected components and to compare grids while ignoring symmetries. In addition to the size of the grid, it's possible to specify the number of bits to use per grid entry. The smaller the number of bits per entry, the more efficient memory usage will be. However, fewer bits per entry also restricts the range of values that each entry can have. See the documentation for the BITS_PER_ENTRY_* ...
AbstractShortGame: A skeletal implementation of Game that provides basic functionality for short games. A short game (or traditional game ) is a loopfree game with finitely many subpositions. It is not necessary for short games to be instances of AbstractShortGame ; this is merely a convenience class. AbstractShortGame includes a default implementation of canonicalize 55 : Canonicalize each left and right option, assemble the canonical options into a single CanonicalGame , and cache the result. Subclasses should override the canonicalize method when a more efficient algorithm is available. Subclasses of AbstractShortGame ...
EditorPanel: A graphical component used by the user interface to edit game positions. Editor s are responsible for creating instances of this class, populating them with a graphical representation of a game's position, and constructing new cgsuite.Game s based on the panel's current state. Every graphical component used to edit game positions must be a subclass of EditorPanel . Make sure to call firePropertyChange(EDIT_STATE_PROPERTY, ...) whenever the user modifies the state of the EditorPanel . This will insure that the UI's graphical components are properly updated in response to an edit. Grid-based editors ...
Output: An abstract output scheme that can be converted to any of several forms of output. Combinatorial Game Suite supports numerous object types (various implementations of cgsuite.Game , strings, tables, etc.) and several output methods (plain text, LaTeX, screen images, etc.) Output objects serve as abstract intermediate representations between the internal data structures and the output that users actually see. This avoids excessive code duplication, and simplifies the task of generating output for plug-ins. It is rarely necessary to implement Output directly. The standard implementations, StyledTextOutput ...
Context: Contains utility methods for communicating with the Combinatorial Game Suite interface. Plug-ins can use this class to reference the primary cache, generate output in mid-calculation, report warning and debugging messages, and otherwise communicate with the kernel. Plug-in writers should call the static method getActiveContext 55 to obtain a reference to the Context object owned by the kernel. For example, to obtain a reference to the primary cache, use: Context.getActiveContext().getPrimaryCache() Plug-ins should never call setActiveContext 55 . It should only be called by stand-alone applications ...
Plugin: Exposes a plug-in package to the Combinatorial Game Suite user interface. Every plug-in package must include a class that implements Plugin . Immediately after a plug-in is loaded, an instance of that class is created and its initialize 55 method is invoked. Types, constants, methods and output handlers should be declared during the call to initialize , by calling back to the supplied PluginContext . It is advisable to use a single implementation of Plugin to declare all classes in a plug-in package. For example, if a package includes three subclasses of Game , then all three can be declared by ...
UnsimplifiedGame: A wrapper for another Game that is immune to simplifications. An instance of this class contains a reference to exactly one other game. It behaves exactly as its component, except that any calls to simplify 55 and simplifyExpression 55 will be ignored. This class is primarily useful when you want the Combinatorial Game Suite interface to display a game in a form other than simplest form. For example, every canonical game has a unique representation as the sum of heated infinitesimals. In CGSuite, this "thermal dissociation" is wrapped in an UnsimplifiedGame , since otherwise the sum would be collapsed ...
GridEditorPanel: A generalized, reusable grid-based EditorPanel . A GridEditorPanel displays a cgsuite.util.Grid in a rectangular array, mapping the Grid 's integer values to images using a user-specified list of icons. Entries in the grid can be modified using a variety of user input methods. Custom Editor s may create and populate instances of GridEditorPanel directly; a variety of methods are provided for customizing the grid's behavior and display. If additional flexibility is needed, GridEditorPanel can be subclassed, or a new EditorPanel written from scratch.
CanonicalStopperGame: A stopper in canonical form. A loopy game is a stopper provided there is no infinite alternating sequence of moves proceeding from any subposition. Just as with loopfree games, every stopper has a canonical form obtained by eliminating all dominated options and bypassing all reversible ones. Much of the theory regarding stoppers can be found in Chapter 11 of Winning Ways. There are two ways to construct a CanonicalStopperGame : Pass it a CanonicalGame , or first construct a LoopyGame and then call LoopyGame.canonicalizeStopper 55 .
OutputHandler: Converts objects to Output suitable for display in the Combinatorial Game Suite user interface. To add support for graphical or LaTeX output for your plug-in, declare an instance of this interface using PluginContext.registerOutputHandler 55 . When the UI is ready to display an object whose type matches one of the classes declared by your plug-in, it calls the associated OutputHandler 's getOutput 55 method.
DyadicRational: A rational number whose denominator is a power of 2. Support is also included for two special cases, POSITIVE_INFINITY 55 and NEGATIVE_INFINITY 55 . POSITIVE_INFINITY and NEGATIVE_INFINITY behave as expected when compared to finite rationals. The results of POSITIVE_INFINITY + NEGATIVE_INFINITY and POSITIVE_INFINITY - POSITIVE_INFINITY are not defined, but for time efficiency no argument checking is performed.
Stop: The left or right stop of a game. An instance of Stop contains the following information: The value of the stop. For loopy games, this may be POSITIVE_INFINITY 55 or NEGATIVE_INFINITY 55 to indicate that the stopping position is ON 55 or OFF 55 , respectively; The player whose turn it is to move when the stopping position is reached.
MethodInvoker: An invocation scheme for a Combinatorial Game Suite method. Instances of this interface establish links between methods exposed to the CGSuite user interface and underlying Java methods. When the user calls a method from inside the interface, Combinatorial Game Suite calls the invoke 55 method of the associated MethodInvoker . For details, refer to the MethodInfo class documentation.
OrdinalSumGame: The ordinal sum of two games. The ordinal sum of G and H , usually denoted G:H , is defined by G:H = {G L , G:H L | G R , G:H R }. Thus G:H is like G+H , except that any move in G annihilates the copy of H . Note that although G:H depends only on the value, and not the form, of H , it may depend on the form of G . For example, 0:1 = 1 , but {-1|1}:1 = 1/2 .
Game: The primary interface for combinatorial games in Combinatorial Game Suite. Every type of game must implement Game . If you are implementing a short game (that is, a loopfree game with finitely many subpositions), you should consider deriving a class from AbstractShortGame instead. Every instance of Game must be immutable. The internal state of a Game can change (for example, to update a cache), but not in a way that is visible to other components.
StaggerPosition: An impartial grid game with one piece. It is played on a quarter-infinite board with edges at North and West. The piece can be oriented west or north. A move consists of advancing any (non-zero) number of squares in the direction the piece is pointing, then optionally changing the orientation. There are several rules variants we will check out that promise more interesting behaviour. (update 18/2): Michael says the variants have no more promise then the original. Oh well. There is no caching at present.
ProductGame: The Norton product of two games. If G is an integer, then G.U is simply equal to the sum of G copies of U . Otherwise, it is equal to the Norton product of G by U as defined in Winning Ways. In particular, G. ↑ yields a game of atomic weight G , for any G . Note that G.U will not behave as expected unless G is an integer or U > 0 .
OutputContext: Contains utility methods accessible during output generation. This is passed to OutputHandler.getOutput 55 when the user interface needs output for a particular object. See the OutputHandler documentation for details.
PluginContext: Registers plug-in components with the user interface. Combinatorial Game Suite passes an instance of this class to each plug-in's initialize 55 method. Plug-ins should call back to the PluginContext to register types, constants, methods, editors, output handlers, and preferences panels with the UI.
ImageOutput: An image to display as output. This class serves as a wrapper to hold an explicit Image until it needs to be displayed as output. The toScreenImage 55 method just returns the image supplied to the constructor. An alternate text representation can also be supplied for use in non-graphical environments.

Home | Contact Us | Privacy Policy | Terms of Service