package jcliffford

jclifford
Class CliffordBitSet

java.lang.Object
  extended by jclifford.CliffordBitSet

public class CliffordBitSet
extends java.lang.Object

This class represents a BitSet - 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, CliffordTreeSet

Field Summary
private static double eps
          Precision.
private  java.util.TreeMap map
          Blade-value mappings of the element.
 
Constructor Summary
CliffordBitSet()
          Creates and returns an element with no blade-value mappings.
 
Method Summary
 CliffordBitSet add(CliffordBitSet cl)
          Computes the sum with the specified element.
 java.lang.Object clone()
          Creates and returns an element deeply cloning this element.
 CliffordBitSet conj()
          Computes the conjugation of this element.
 boolean equals(java.lang.Object obj)
          Compares this element with the specified element for equality.
 double get(BladeBitSet blade)
          Gets the value of a blade.
 double get(java.lang.String blade)
          Gets the value of a blade.
 int getMaxDimension()
          Gets highest dimension present in this element.
 int getMaxGrade()
          Gets highest grade of this element.
 CliffordBitSet gP(CliffordBitSet cl)
          Computes the geometric product with the specified element.
 CliffordBitSet gP(double scalar)
          Computes the geometric product with the specified scalar.
 CliffordBitSet gradeInv()
          Computes the grade involution of this element.
 CliffordBitSet inv()
          Computes the inverse of this element.
 boolean isScalar()
          Verifies if this element is a scalar.
 boolean isVector()
          Verifies if this element is a vector.
 boolean isZero()
          Verifies if this element is a scalar.
 CliffordBitSet lC(CliffordBitSet cl)
          Computes the left contraction with the specified element.
 CliffordBitSet meet(CliffordBitSet cl, CliffordBitSet i)
          Computes the meet with the specified element in a common subspace.
 void normalize()
          Normalizes this element respect the unsigned module.
 void noZero()
          Removes blades with values lower than eps.
 void put(BladeBitSet blade, double value)
          Puts a new blade-value mapping or updates existing.
 void put(java.lang.String blade, double value)
          Puts a new blade-value mapping or updates existing.
 CliffordBitSet rC(CliffordBitSet cl)
          Computes the right contraction with the specified element.
 void remove(BladeBitSet blade)
          Removes blade-value mapping if existing.
 void remove(java.lang.String blade)
          Removes blade-value mapping if existing.
 CliffordBitSet rev()
          Computes the reverse of this element.
 CliffordBitSet sub(CliffordBitSet cl)
          Computes the difference with the specified element.
 java.lang.String toString()
          Returns a string representation of this element.
 double uQuadMod()
          Computes the quad module of an element discarding signature.
 CliffordBitSet wP(CliffordBitSet cl)
          Computes the wedge product with the specified element.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eps

private static double eps
Precision.


map

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

Constructor Detail

CliffordBitSet

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

Method Detail

get

public final double get(BladeBitSet 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.

get

public final double get(java.lang.String blade)
Gets the value of a blade.

Parameters:
blade - the binary mask representing the specified blade (format is "i, j, ...", where i, j are versor indexes) whose value is to be retrieved.
Returns:
the value of the specified blade, 0.0 if blade is not present.

put

public final void put(BladeBitSet 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.

put

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

Parameters:
blade - the binary mask representing the specified blade (format is "i, j, ...", where i, j are versor indexes) that is to be put.
value - the corresponding value of the specified blade.

remove

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

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

remove

public final void remove(java.lang.String blade)
Removes blade-value mapping if existing.

Parameters:
blade - the binary mask representing the specified blade (format is "i, j, ...", where i, j are versor indexes) that is to be removed.

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.

clone

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

Overrides:
clone in class java.lang.Object

noZero

public final void noZero()
Removes blades with values lower than eps.


uQuadMod

public final double uQuadMod()
Computes the quad module of an element discarding signature.

Returns:
the quad module of the specified element discarding signature.

normalize

public final void normalize()
Normalizes this element respect the unsigned module.


getMaxGrade

public final int getMaxGrade()
Gets highest grade of this element.

Returns:
highest grade of this element.

isScalar

public final boolean isScalar()
Verifies if this element is a scalar.

Returns:
true if this element is a scalar, false otherwise.

isZero

public final boolean isZero()
Verifies if this element is a scalar.

Returns:
true if this element is a scalar, false otherwise.

isVector

public final boolean isVector()
Verifies if this element is a vector.

Returns:
true if this element is a vector, false otherwise.

getMaxDimension

public final int getMaxDimension()
Gets highest dimension present in this element.

Returns:
highest present in this element.

equals

public boolean equals(java.lang.Object obj)
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.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the second element that is to be compared.
Returns:
true if this Element and the specified element are equals, false otherwise.

add

public final CliffordBitSet add(CliffordBitSet 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 final CliffordBitSet sub(CliffordBitSet 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.

gradeInv

public final CliffordBitSet gradeInv()
Computes the grade involution of this element.

Returns:
a new element from the grade involution of the specified element.

rev

public final CliffordBitSet rev()
Computes the reverse of this element.

Returns:
a new element from the reversion of this element.

inv

public final CliffordBitSet inv()
Computes the inverse of this element.

Returns:
a new element from the inversion of this element.

conj

public final CliffordBitSet conj()
Computes the conjugation of this element. The conjugation of an element is a grade involution and a reversion.

Returns:
a new element from the conjugation of the specified element.

gP

public final CliffordBitSet 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 final CliffordBitSet gP(CliffordBitSet 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 final CliffordBitSet wP(CliffordBitSet 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 final CliffordBitSet lC(CliffordBitSet 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 final CliffordBitSet rC(CliffordBitSet 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.

meet

public final CliffordBitSet meet(CliffordBitSet cl,
                                 CliffordBitSet i)
Computes the meet with the specified element in a common subspace.

Parameters:
cl - the second element of the meet.
i - the element representing a common subspace.
Returns:
a new element from the meet with the specified element.

package jclifford

package jclifford API Specification