public static MatrixType lookup(MatrixTypesClass type) { if (type == MatrixTypesClass.DMatrixRMaj) { return(DDRM()); } else if (type == MatrixTypesClass.FMatrixRMaj) { return(FDRM()); } else if (type == MatrixTypesClass.ZMatrixRMaj) { return(ZDRM()); } else if (type == MatrixTypesClass.CMatrixRMaj) { return(CDRM()); } else if (type == MatrixTypesClass.DMatrixSparseCSC) { return(DSCC()); } else if (type == MatrixTypesClass.FMatrixSparseCSC) { return(FSCC()); } else { throw new ArgumentException("Unknown class"); } }
public static SimpleMatrix <W> identity(int width, MatrixTypesClass type) { SimpleMatrix <W> ret = new SimpleMatrix <W>(width, width, type); ret.ops.setIdentity((W)ret.mat); return(ret); }
public MatrixType(bool fijed, bool real, bool dense, int bits, MatrixTypesClass type) { this.real = real; this.fijed = fijed; this.dense = dense; this.bits = bits; this.classType = type; }
public SimpleMatrix(int numRows, int numCols, MatrixTypesClass type) : this(numRows, numCols, MatrixType.lookup(type) /*MatrixType.lookup(type)*/) { }