All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JSci.maths.symbolic.Sum Maven / Gradle / Ivy

Go to download

JSci is a set of open source Java packages. The aim is to encapsulate scientific methods/principles in the most natural way possible. As such they should greatly aid the development of scientific based software. It offers: abstract math interfaces, linear algebra (support for various matrix and vector types), statistics (including probability distributions), wavelets, newtonian mechanics, chart/graph components (AWT and Swing), MathML DOM implementation, ... Note: some packages, like javax.comm, for the astro and instruments package aren't listed as dependencies (not available).

The newest version!
package JSci.maths.symbolic;
 
import JSci.maths.*;
import JSci.maths.groups.*;
import java.util.*;

class Sum extends Expression {
    
    private final List terms;
    
    public Sum(Expression [] a) {
	terms = Arrays.asList(a);
    }

    public Sum(List a) {
	terms = a;
    }

    public Sum(Expression a,Expression b) {
	terms = new ArrayList();
	terms.add(a);
	terms.add(b);
    }

    public String toString() { 
	String r = "";
	Expression f;
	for (int j=0;j0) r+="+";
	    f=(Expression)terms.get(j);
	    if (f.getPriority() t
	List t = new ArrayList();
	for (int j=0;j s
	AbelianGroup.Member c = null;
	List s = new ArrayList();
	for (int j=0;j




© 2015 - 2024 Weber Informatics LLC | Privacy Policy