using System; namespace NumSharp { public class ViewInfo : ICloneable { /// /// ParentShape points to a sliced shape that was reshaped. usually this is null, except if the Shape is a reshaped slice. /// ParentShape always is a sliced shape! /// public Shape ParentShape; /// /// The slice definition for every dimension of the OriginalShape /// public SliceDef[] Slices; /// /// OriginalShape is the primitive shape of the unsliced array /// public Shape OriginalShape; /// /// UnreducedShape is the shape after slicing but without dimensionality reductions due to index access /// public Shape UnreducedShape; public ViewInfo Clone() { return new ViewInfo() {Slices = Slices?.Clone() as SliceDef[], OriginalShape = OriginalShape.Clone(true, false, false), UnreducedShape = UnreducedShape.Clone(true, false, false), ParentShape = ParentShape.Clone(true, false, false)}; } object ICloneable.Clone() => Clone(); } }