jscicalc.expression.Sum Class Reference

This class represents a sum of Expression objects. More...

Inheritance diagram for jscicalc.expression.Sum:

jscicalc.expression.SumOrProduct jscicalc.expression.Expression jscicalc.OObject jscicalc.GObject
Collaboration diagram for jscicalc.expression.Sum:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Sum (Expression expression)
 Construct a Sum.
 Sum ()
 Construct a Sum.
Sum add (Complex z)
 Add a Complex to this.
Sum clone ()
 Create a copy of this Sum.
boolean isNegative ()
 Indicate whether or not expression is negative.
jscicalc.StringArray toHTMLSubString (int maxChars, int precision, final Base base, final Notation notation, double polarFactor)
 Function to create an HTML string representation of the Sum.
jscicalc.StringArray toHTMLParenString (int maxChars, int precision, final Base base, final Notation notation, double polarFactor)
OObject add (Product x)
 Add a Product to this.
OObject add (Sum x)
 Add a sum to this.
Sum negate ()
 Get the negative of this.
OObject unBox ()
 Return either this or the first expression in this if this is just a container for a single object.
int compareTo (Sum sum)
 The comparison operator.
OObject auto_simplify ()
 Simplify a Sum expression.
OObject substitute (jscicalc.Substitution substitution)

Static Public Member Functions

static void main (String[] args)

Package Functions

OObject multiply (Sum t)
 Multiply this by a Sum t: that is, find this * t.

Private Member Functions

OObject rMultiply (OObject o)
 Right multiply this by o: that is, find this * o.


Detailed Description

This class represents a sum of Expression objects.

expression.

See also:
OObject
Author:
J. D. Lamb
Version:
Revision
1.6

Constructor & Destructor Documentation

jscicalc.expression.Sum.Sum ( Expression  expression  ) 

Construct a Sum.

Parameters:
expression The expression from which to construct the Sum.

References jscicalc.expression.SumOrProduct.complex, and jscicalc.expression.SumOrProduct.expressionList.

jscicalc.expression.Sum.Sum (  ) 


Member Function Documentation

Sum jscicalc.expression.Sum.add ( Complex  z  ) 

Add a Complex to this.

Parameters:
z The complex to add
Returns:
The sum

References jscicalc.complex.Complex.add(), jscicalc.expression.Sum.clone(), and jscicalc.expression.SumOrProduct.complex.

Referenced by jscicalc.OObject.add().

Sum jscicalc.expression.Sum.clone (  ) 

boolean jscicalc.expression.Sum.isNegative (  ) 

jscicalc.StringArray jscicalc.expression.Sum.toHTMLSubString ( int  maxChars,
int  precision,
final Base  base,
final Notation  notation,
double  polarFactor 
)

Function to create an HTML string representation of the Sum.

The arguments are ignored except for the Complex.

Parameters:
maxChars ignored
precision ignored
base ignored
notation ignored
polarFactor ignored
Returns:
a String representing the variable.

References jscicalc.expression.SumOrProduct.complex, jscicalc.expression.SumOrProduct.expressionList, jscicalc.complex.Complex.isNegative(), jscicalc.OObject.isNegative(), jscicalc.complex.Complex.toHTMLSubString(), and jscicalc.OObject.toHTMLSubString().

Referenced by jscicalc.expression.Sum.toHTMLParenString().

jscicalc.StringArray jscicalc.expression.Sum.toHTMLParenString ( int  maxChars,
int  precision,
final Base  base,
final Notation  notation,
double  polarFactor 
)

OObject jscicalc.expression.Sum.add ( Product  x  ) 

OObject jscicalc.expression.Sum.add ( Sum  x  ) 

Add a sum to this.

Parameters:
x The addend
Returns:
The sum of this and x.

References jscicalc.OObject.add(), jscicalc.complex.Complex.add(), jscicalc.expression.Sum.clone(), and jscicalc.expression.SumOrProduct.complex.

Sum jscicalc.expression.Sum.negate (  )  [virtual]

OObject jscicalc.expression.Sum.rMultiply ( OObject  o  )  [private]

OObject jscicalc.expression.Sum.multiply ( Sum  t  )  [package]

OObject jscicalc.expression.Sum.unBox (  ) 

Return either this or the first expression in this if this is just a container for a single object.

Returns:
simplified expression

References jscicalc.expression.SumOrProduct.complex, jscicalc.expression.SumOrProduct.expressionList, and jscicalc.complex.Complex.isZero().

Referenced by jscicalc.expression.Sum.auto_simplify().

int jscicalc.expression.Sum.compareTo ( Sum  sum  ) 

OObject jscicalc.expression.Sum.auto_simplify (  ) 

OObject jscicalc.expression.Sum.substitute ( jscicalc.Substitution  substitution  ) 

static void jscicalc.expression.Sum.main ( String[]  args  )  [static]


The documentation for this class was generated from the following file:

Generated on Sun Jun 1 08:58:07 2008 for Java Scientific Calculator by  doxygen 1.5.5