Exemple #1
0
        public Volume <T> ReShape(params int[] dimensions)
        {
            var shape = new Shape(dimensions);

            shape.GuessUnkownDimension(this.Shape.TotalLength);

            return(BuilderInstance <T> .Volume.Build(this.Storage, shape));
        }
Exemple #2
0
        public Volume <T> ReShape(Shape shape)
        {
            var guessedShape = new Shape(shape);

            for (int i = 0; i < shape.DimensionCount; i++)
            {
                if (shape.GetDimension(i) == Shape.Keep)
                {
                    guessedShape.SetDimension(i, this.Shape.GetDimension(i));
                }
            }
            guessedShape.GuessUnkownDimension(this.Shape.TotalLength);

            Volume <T> .Count--;

            return(BuilderInstance <T> .Volume.Build(this.Storage, guessedShape));
        }