package jcliffford

jclifford
Class BladeBitSet

java.lang.Object
  extended by jclifford.BladeBitSet
All Implemented Interfaces:
java.lang.Comparable

 class BladeBitSet
extends java.lang.Object
implements java.lang.Comparable

This class represents a BitSet implementation of a blade (wedge product of generic basis versors).

It is an utility class for the CliffordBitSet class.

Version:

0.9

Author:

Realized by Giorgio Vassallo, Pietro Brignola, November 2002.

See Also:
Blade, BladeTreeSet

Field Summary
private  java.util.BitSet bitset
          Bit set of the versors present in this blade.
 
Constructor Summary
BladeBitSet()
          Creates and returns an new BadeBitSet representing a scalar.
BladeBitSet(int versor)
          Creates and returns an new BadeBitSet representing the specified versor.
BladeBitSet(java.lang.String blade)
          Creates and returns an new BadeBitSet representing the specified blade.
 
Method Summary
 java.lang.Object clone()
          Creates and returns an new Object deeply cloning this Object.
 int compareTo(java.lang.Object object)
          Compare this object with another comparing versors.
(package private)  BladeBitSet geometricProduct(BladeBitSet bld)
          Computes the geometric product with the specified blade.
(package private)  int getGrade()
          Returns the grade of this blade.
(package private)  int getMaxDimension()
          Returns highest dimension present in this blade.
(package private)  boolean getSign(BladeBitSet bld)
          Computes the sign of the product with the specified blade.
(package private)  boolean getVersor(int versor)
          Gets specified versor in this blade.
(package private)  BladeBitSet leftContraction(BladeBitSet bld)
          Computes the left contraction with the specified blade.
(package private)  BladeBitSet rightContraction(BladeBitSet bld)
          Computes the right contraction with the specified blade.
(package private)  void setVersor(int versor, boolean present)
          Sets specified versor in this blade.
 java.lang.String toString()
          Returns a string representation of this blade.
(package private)  BladeBitSet wedgeProduct(BladeBitSet bld)
          Computes the wedge product with the specified blade.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bitset

private java.util.BitSet bitset
Bit set of the versors present in this blade. Empty blade represents a scalar.

Constructor Detail

BladeBitSet

BladeBitSet()
Creates and returns an new BadeBitSet representing a scalar.


BladeBitSet

BladeBitSet(int versor)
      throws java.lang.IllegalArgumentException
Creates and returns an new BadeBitSet representing the specified versor.

Parameters:
versor - the versor of this blade.
Throws:
java.lang.IllegalArgumentException - if versor is invalid.

BladeBitSet

BladeBitSet(java.lang.String blade)
      throws java.lang.IllegalArgumentException
Creates and returns an new BadeBitSet representing the specified blade.

Parameters:
blade - the mask representing the specified blade (format is "i, j, ...", where i, j are versor indexes).
Throws:
java.lang.IllegalArgumentException - if blade mask is invalid.
Method Detail

clone

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

Overrides:
clone in class java.lang.Object

getVersor

boolean getVersor(int versor)
Gets specified versor in this blade.

Parameters:
versor - the specified versor to be get in this blade.
Returns:
true if the specified versor is present in this blade.

setVersor

void setVersor(int versor,
               boolean present)
Sets specified versor in this blade.

Parameters:
versor - the specified versor to be set in this blade.
present - the flag corresponding to the presence of the versor in this blade.

getGrade

int getGrade()
Returns the grade of this blade.

Returns:
the grade of the blade.

getMaxDimension

int getMaxDimension()
Returns highest dimension present in this blade.

Returns:
highest dimension present in this blade.

compareTo

public int compareTo(java.lang.Object object)
Compare this object with another comparing versors.

Specified by:
compareTo in interface java.lang.Comparable

getSign

boolean getSign(BladeBitSet bld)
Computes the sign of the product with the specified blade.

Parameters:
bld - the second blade of the product.
Returns:
true if the sign of the product with the specified blades is negative, false otherwise.

geometricProduct

BladeBitSet geometricProduct(BladeBitSet bld)
Computes the geometric product with the specified blade.

Parameters:
bld - the second blade of the geometric product.
Returns:
new blade from the geometric product with the specified blade.

wedgeProduct

BladeBitSet wedgeProduct(BladeBitSet bld)
Computes the wedge product with the specified blade.

Parameters:
bld - the second blade of the wedge product.
Returns:
null if blades have common versors or a new blade from the wedge product with the specified blade.

leftContraction

BladeBitSet leftContraction(BladeBitSet bld)
Computes the left contraction with the specified blade.

Parameters:
bld - the second blade of the left contraction.
Returns:
null if versors are not a subset of the specified blade, or a new blade from the left contraction with the specified blade.

rightContraction

BladeBitSet rightContraction(BladeBitSet bld)
Computes the right contraction with the specified blade.

Parameters:
bld - the second blade of the right contraction.
Returns:
null if versors are not a subset of the specified blade, or a new blade from the left contraction with the specified blade.

toString

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

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

package jclifford

package jclifford API Specification