Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace skalarprodukt
- {
- public sealed class NDimsMat
- {
- private Tuple<int, int> _sizes;
- public static int n
- {
- get
- {
- return 2;
- }
- }
- public Tuple<int, int> sizes
- {
- get
- {
- return this._sizes;
- }
- }
- public int length
- {
- get
- {
- return this._sizes.Item1 * (this._sizes.Item2 * 1);
- }
- }
- public NDimsMat()
- {
- this._sizes = new Tuple<int, int>(0, 0);
- }
- public NDimsMat(Tuple<int, int> sizes)
- {
- this._sizes = sizes;
- }
- public int indexer(Tuple<int, int> ind)
- {
- Tuple<int, int> sizes = this._sizes;
- return ind.Item1 + sizes.Item1 * ind.Item2;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement