it.ssc.vector_spaces.BigVector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr331-ssc Show documentation
Show all versions of jsr331-ssc Show documentation
This is a JSR331 interface for SSC (Software for the Calculation of the Simplex) is a java library for solving linear programming problems v. 3.0.1.
SSC was designed and developed by Stefano Scarioli.
The newest version!
package it.ssc.vector_spaces;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
public class BigVector {
static final BigDecimal ZERO_BIG=new BigDecimal("0.0",MathContext.DECIMAL128);
public enum TYPE_VECTOR {ROW, COLUMN};
private TYPE_VECTOR tipo;
private BigDecimal[] big_vector;
/**
* Crea un vettore riga */
public BigVector(double[] vector) {
this(vector,TYPE_VECTOR.ROW);
}
public BigVector(int size,TYPE_VECTOR tipo) {
this.tipo=tipo;
big_vector=new BigDecimal[size];
inizialize();
}
private void inizialize() {
for(int _a=0;_a