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

org.lsmp.djep.groupJep.values.Permutation Maven / Gradle / Ivy

Go to download

JEP is a Java library for parsing and evaluating mathematical expressions.

The newest version!
/* @author rich
 * Created on 15-Mar-2004
 */
package org.lsmp.djep.groupJep.values;
import org.lsmp.djep.groupJep.*;
/**
 * @author Rich Morris
 * Created on 15-Mar-2004
 */
public class Permutation extends Number {

	protected GroupI group;
	protected Integer perm[];
	protected int len;
	/**
	 * 
	 */
	public Permutation(GroupI group,Integer perm[]) {
		super();
		this.group = group;
		this.perm = perm;
		this.len = perm.length;
	}

	public Permutation add(Permutation p1)
	{
		Integer res[] = new Integer[p1.perm.length];
		for(int i=0;i0) sb.append(",");
			sb.append(this.perm[i].toString());
		}
		sb.append("]");
		return sb.toString();
	}
	/** Just returns 0. Minimal implematation for compatability with Number. */
	public double doubleValue() {return 0;	}
	public float floatValue() {return 0;	}
	public int intValue() {	return 0;	}
	public long longValue() {return 0;	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy