sdr 0.21

net.cscott.sdr.calls
Class FormationMapper

java.lang.Object
  extended by net.cscott.sdr.calls.FormationMapper

public class FormationMapper
extends Object

The FormationMapper class contains methods to disassemble a square, given component formations (ie, get a diamond back from a siamese diamond, breathing in), and to reassemble a square given components (given a diamond and the various tandems and couples, put them together, breathing out).

Version:
$Id: FormationMapper.java,v 1.10 2006-10-30 22:09:29 cananian Exp $
Author:
C. Scott Ananian

Nested Class Summary
static class FormationMapper.FormationPiece
           
 
Field Summary
static Formation test1
           
static Formation test2
           
 
Constructor Summary
FormationMapper()
           
 
Method Summary
static Formation compress(List<FormationMapper.FormationPiece> pieces)
          Create canonical formation by compressing components of a given formation.
static Formation insert(Formation meta, Map<Dancer,Formation> components)
          Insert formations into a meta-formation.
static void main(String[] args)
          This method is just for testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

test1

public static Formation test1

test2

public static Formation test2
Constructor Detail

FormationMapper

public FormationMapper()
Method Detail

main

public static void main(String[] args)
This method is just for testing.


insert

public static Formation insert(Formation meta,
                               Map<Dancer,Formation> components)
Insert formations into a meta-formation.


compress

public static Formation compress(List<FormationMapper.FormationPiece> pieces)
Create canonical formation by compressing components of a given formation. The result has the meta formation, as well as a map giving the correspondence between the new phantom dancers and the input formations.


sdr 0.21

Copyright (c) 2006 C. Scott Ananian