package jcliffford

jclifford
Class CliffordTreeSet

java.lang.Object
  extended by jclifford.CliffordTreeSet

public class CliffordTreeSet
extends java.lang.Object

This class represents a TreeSet - value map implementation of the Clifford element and all the operation in an arbitrary dimension space.

Version:

0.9

Author:

Realized by Giorgio Vassallo, Pietro Brignola, November 2002.

See Also:
Clifford, CliffordBitSet

Field Summary
private  java.util.TreeMap map
          Blade-value mappings of the element.
 
Constructor Summary
CliffordTreeSet()
          Creates and returns an element with no blade-value mappings.
 
Method Summary
 CliffordTreeSet add(CliffordTreeSet cl)
          Computes the sum with the specified element.
 java.lang.Object clone()
          Creates and returns an element deeply cloning this element.
 boolean equals(CliffordTreeSet cl, double tol)
          Compares this element with the specified element for equality.
 double get(BladeTreeSet blade)
          Gets the value of a blade.
 CliffordTreeSet gP(CliffordTreeSet cl)
          Computes the geometric product with the specified element.
 CliffordTreeSet gP(double scalar)
          Computes the geometric product with the specified scalar.
 CliffordTreeSet lC(CliffordTreeSet cl)
          Computes the left contraction with the specified element.
 void put(BladeTreeSet blade, double value)
          Puts a new blade-value mapping or updates existing.
 CliffordTreeSet rC(CliffordTreeSet cl)
          Computes the right contraction with the specified element.
 void remove(BladeTreeSet blade)
          Removes blade-value mapping if existing.
 CliffordTreeSet sub(CliffordTreeSet cl)
          Computes the difference with the specified element.
 java.lang.String toString()
          Returns a string representation of this element.
 CliffordTreeSet wP(CliffordTreeSet cl)
          Computes the wedge product with the specified element.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

private java.util.TreeMap map
Blade-value mappings of the element.

Constructor Detail

CliffordTreeSet

public CliffordTreeSet()
Creates and returns an element with no blade-value mappings.

Method Detail

get

public final double get(BladeTreeSet blade)
Gets the value of a blade.

Parameters:
blade - the blade whose value is to be retrieved.
Returns:
the value of the specified blade, 0.0 if blade is not present in this element.

put

public final void put(BladeTreeSet blade,
                      double value)
Puts a new blade-value mapping or updates existing.

Parameters:
blade - the specified blade that is to be put.
value - the corresponding value of the specified blade.

remove

public final void remove(BladeTreeSet blade)
Removes blade-value mapping if existing.

Parameters:
blade - the int representing the specified blade that is to be removed.

add

public CliffordTreeSet add(CliffordTreeSet cl)
Computes the sum with the specified element.

Parameters:
cl - the second element of the sum.
Returns:
a new element from the sum with the specified element.

sub

public CliffordTreeSet sub(CliffordTreeSet cl)
Computes the difference with the specified element.

Parameters:
cl - the second element of the difference.
Returns:
a new element subtracting the second specified element from this.

gP

public CliffordTreeSet gP(double scalar)
Computes the geometric product with the specified scalar.

Parameters:
scalar - the scalar of the geometric product.
Returns:
a new element from the geometric product with the specified scalar.

gP

public CliffordTreeSet gP(CliffordTreeSet cl)
Computes the geometric product with the specified element.

Parameters:
cl - the second element of the geometric product.
Returns:
a new element from the geometric product with the specified element.

wP

public CliffordTreeSet wP(CliffordTreeSet cl)
Computes the wedge product with the specified element.

Parameters:
cl - the second element of the wedge product.
Returns:
a new element from the wedge product with the specified element.

lC

public CliffordTreeSet lC(CliffordTreeSet cl)
Computes the left contraction with the specified element.

Parameters:
cl - the second element of the left contraction.
Returns:
a new element from the left contraction with the specified element.

rC

public CliffordTreeSet rC(CliffordTreeSet cl)
Computes the right contraction with the specified element.

Parameters:
cl - the second element of the right contraction.
Returns:
a new element from the right contraction with the specified element.

equals

public boolean equals(CliffordTreeSet cl,
                      double tol)
Compares this element with the specified element for equality. Two elements are considered equals if they have same blades and corresponding values differing less than tollerance.

Parameters:
cl - the second element that is to be compared.
tol - the tollerance.
Returns:
true if this element and the specified element are equals, false otherwise.

clone

public java.lang.Object clone()
Creates and returns an element deeply cloning this element.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of this element.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this element.

package jclifford

package jclifford API Specification