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

it.ssc.vector_spaces.Matrix 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 Matrix  {
	
	protected double[][] big_matrix;
	protected int n_row;
	protected int n_column;
	
	public Matrix(int n_row, int n_column) {
		this.n_row=n_row;
		this.n_column=n_column;
		this.big_matrix=new double[n_row][n_column];
	}
	
	public double[][] getMatrix() {
		return big_matrix;
	}
	
	public  Matrix(double[][] matrix) throws MatrixException  {
		if(matrix==null) throw new MatrixException("Non posso costruire un Matrix con un argomento del costruttore a null");
		if(matrix[0]==null) throw new MatrixException("Non posso costruire un Matrix con un matrix[0] a null");
		this.n_row= matrix.length;
		this.n_column=matrix[0].length;
		big_matrix=matrix;
	}
	
	
	
	/*
	public Matrix(double[][] matrix) throws MatrixException  {
		
		if(matrix==null) throw new MatrixException("Non posso costruire un Matrix con un argomento del costruttore a null");
		this.n_row= matrix.length;
		this.n_column=matrix[0].length;
		big_matrix=new double[n_row][n_column];
		for(int _i=0;_i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy