コード例 #1
0
        private BaseBinaryMatrixReader InitWriter(MatrixHeader option)
        {
            BaseBinaryMatrixReader matrixReader = this.matrixReader;

            switch (option.MatrixType)
            {
            case MatrixType.Array:
                matrixReader = new BinaryArrayMatrixReader(Stream);
                break;

            case MatrixType.Vector:
                break;

            case MatrixType.Sparse:
                matrixReader = new BinaryArrayMatrixReader(Stream);
                break;

            case MatrixType.Float:
                break;

            case MatrixType.FloatWing:
                break;

            case MatrixType.Diagonal:
                matrixReader = new BinaryArrayMatrixReader(Stream);
                break;

            case MatrixType.Symmetric:
                matrixReader = new BinaryArrayMatrixReader(Stream);
                break;

            case MatrixType.VectorMatrix:
                break;

            case MatrixType.ZeroMatrix:
                break;

            case MatrixType.ConstMatrix:
                break;

            case MatrixType.ResizeableMatrix:
                break;

            case MatrixType.Unknow:
            default:
                matrixReader = new BinaryArrayMatrixReader(Stream);
                break;
            }
            return(matrixReader);
        }
コード例 #2
0
        public override IMatrix Read(MatrixHeader option)
        {
            this.matrixReader = InitWriter(option);

            return(matrixReader.Read(option));
        }