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

it.ssc.vector_spaces.Vector Maven / Gradle / Ivy

Go to download

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;

public class Vector {
	

	public enum TYPE_VECTOR {ROW, COLUMN};
	private TYPE_VECTOR tipo;
	private double[] vector;
	
	/** 
	 * Crea un vettore riga */
	
	
	public Vector(double[]  vectorArg) {
		this(vectorArg,TYPE_VECTOR.ROW);
	}
	
	public  Vector(int size,TYPE_VECTOR tipo) {
		this.tipo=tipo;
		vector=new double[size];
	}
	
	public TYPE_VECTOR getTipo() {
		return tipo;
	}
	
	public Vector(double[] vectorArg,TYPE_VECTOR tipo) {
		this.tipo=tipo;
		if(vectorArg==null) throw new NullPointerException("Non posso costruire un oggetto Vector con argomento del costruttore a null");
		this.vector=new double[vectorArg.length];
		for(int _a=0;_a




© 2015 - 2024 Weber Informatics LLC | Privacy Policy