treebolic.core
Class HyperTranslation

java.lang.Object
  extended by treebolic.core.Complex
      extended by treebolic.core.HyperTranslation

public class HyperTranslation
extends Complex

Translation

Author:
Bernard Bou

Field Summary
 
Fields inherited from class treebolic.core.Complex
EAST, im, NORTH, ONE, re, SOUTH, WEST, ZERO
 
Constructor Summary
HyperTranslation()
          Default constructor (defaulting to null translation)
HyperTranslation(Complex p)
          Constructor from point, cartesian representation of translation (relative to 0,0 origin)
HyperTranslation(Complex from, Complex to)
          Construct tranlation from source point and destination points
HyperTranslation(Complex from, Complex to, boolean dummy)
          Constructor of hyperbolic translation which maps 'from' to 0,0 and 0,0 to 'to'
HyperTranslation(double x, double y)
          Constructor from point, cartesian representation of translation (relative to 0,0 origin)
 
Method Summary
static HyperTransform compose(HyperTranslation t1, HyperTranslation t2)
          Compose 2 translations
 HyperTranslation inverse()
          Inverse
 Complex map(Complex z)
          Map point
static Complex map(Complex z, Complex p)
          Map point by translation expressed as point
static Complex map2(Complex z, Complex p1, Complex p2)
          Double-map point by translations expressed as points
 Complex mapinv(Complex z)
          Map point by this translation's inverse
static Complex mapinv(Complex z, Complex p)
          Map point by inverse of translation expressed as point
 Complex toComplex()
          Convert to cartesian representation of translation as point relative to 0,0
 java.lang.String toString()
           
 
Methods inherited from class treebolic.core.Complex
abs2, add, add, arg, conj, conj, div, div, divide, divide, equals, mag, makeFromArg, makeFromArgAbs, mul, mul, multiply, multiply, neg, neg, normalize, onediv, set, set, sub, sub
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HyperTranslation

public HyperTranslation()
Default constructor (defaulting to null translation)


HyperTranslation

public HyperTranslation(Complex p)
Constructor from point, cartesian representation of translation (relative to 0,0 origin)

Parameters:
p - cartesian representation of translation as a point (relative to 0,0 origin)

HyperTranslation

public HyperTranslation(double x,
                        double y)
Constructor from point, cartesian representation of translation (relative to 0,0 origin)

Parameters:
x - x-coordinate of cartesian representation of translation (relative to 0,0 origin)
y - y-coordinate of cartesian representation of translation (relative to 0,0 origin)

HyperTranslation

public HyperTranslation(Complex from,
                        Complex to,
                        boolean dummy)
Constructor of hyperbolic translation which maps 'from' to 0,0 and 0,0 to 'to'

Parameters:
from - source point to be translated to 0,0
to - traget point 0,0 is to be translated to
dummy - dummy

HyperTranslation

public HyperTranslation(Complex from,
                        Complex to)
Construct tranlation from source point and destination points

Parameters:
from - source point
to - destination point
Method Detail

toComplex

public Complex toComplex()
Convert to cartesian representation of translation as point relative to 0,0

Returns:
cartesian representation of translation as point relative to 0,0

map

public static Complex map(Complex z,
                          Complex p)
Map point by translation expressed as point

Parameters:
z - point to be mapped
p - point expressing translation relative to 0,0
Returns:
this point with mapped values

map2

public static Complex map2(Complex z,
                           Complex p1,
                           Complex p2)
Double-map point by translations expressed as points

Parameters:
z - point to be mapped
p1 - point expressing translation relative to 0,0
p2 - point expressing translation relative to 0,0
Returns:
this point with mapped values

mapinv

public static Complex mapinv(Complex z,
                             Complex p)
Map point by inverse of translation expressed as point

Parameters:
z - point to be mapped
p - point expressing translation relative to 0,0
Returns:
this point with mapped values (by inverse translation)

map

public Complex map(Complex z)
Map point

Parameters:
z - point to be mapped
Returns:
this point with mapped values

mapinv

public Complex mapinv(Complex z)
Map point by this translation's inverse

Parameters:
z - point to be mapped
Returns:
this point with mapped values

inverse

public HyperTranslation inverse()
Inverse

Returns:
this translation with inversed values

compose

public static HyperTransform compose(HyperTranslation t1,
                                     HyperTranslation t2)
Compose 2 translations

Parameters:
t1 - translation
t2 - translation
Returns:
transform resulting from the composition of 2 translations

toString

public java.lang.String toString()
Overrides:
toString in class Complex