forked from SciSharp/NumSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewInfo.cs
More file actions
35 lines (29 loc) · 1.17 KB
/
ViewInfo.cs
File metadata and controls
35 lines (29 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
namespace NumSharp
{
public class ViewInfo : ICloneable
{
/// <summary>
/// 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!
/// </summary>
public Shape ParentShape;
/// <summary>
/// The slice definition for every dimension of the OriginalShape
/// </summary>
public SliceDef[] Slices;
/// <summary>
/// OriginalShape is the primitive shape of the unsliced array
/// </summary>
public Shape OriginalShape;
/// <summary>
/// UnreducedShape is the shape after slicing but without dimensionality reductions due to index access
/// </summary>
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();
}
}