Skip to content

Doc : Better specification for all classes (What class has what task) #129

Open
@dotChris90

Description

@dotChris90

Since now NumSharp offers a system for non generic, generic, dynamic and static we are in a good position for further dialog / discuss about classes tasks.
Moreover this issue can be used for the developer documentation.

Let us call it "tidy up" and think about what we really need and most important need to think about the SW design.

At the moment I see the following classes and their tasks

  • Storage (which could be a child of interface class IStorage)
    • store the Data somehow (abstract said - concrete store in 1D System.Array)
    • Get and Set Data in this Store (all at once or by indexing)
    • convert Data to specific type
  • Shape ( best practice would be child of IShape)
    • store the dimensions of the array
    • compute the index of a 1D array by multiple indexes if array is a multidimensional array
    • compute the multiple indexes of multidimensional array from the index of 1D array
  • Core.NDArray (non generic )
    • 1 NDArray has 1 Storage & 1 Shape
    • delivers many methods for manipulate, processes, … 1 or N different Core.NDArrays.
    • since its non generic elements are ValueTypes (must be cast to double etc.)
  • Generic.NDArray
    • children of Core.NDArray which offers possibility to direct indexing since elements are of generic parameter type

@Oceania2018 @fdncred you 2 ;) please correct me if I wrote something wrong.

@Oceania2018 Sorry for my stupid questions always - is there a reason that a Storage shall have a shape? Its really just a design question. I just think for Testability Classes shall be as independent as possible from each others. If they do not need a relationship then they should not have. From my point of view since NDArray has a shape, Storage does not need a shape. Storage shall not care about its Shape and just contain the elements. Just our best friend NDArray shall use Storage and Shape to bring elements in correct form.

;) anyway guys have a good week and nice weekend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    further discussneed further discuss to find the best solution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions