Skip to content
This repository has been archived by the owner on Feb 24, 2019. It is now read-only.

1.3 The Hypercube (5p) #22

Closed
emlun opened this issue Sep 18, 2014 · 2 comments
Closed

1.3 The Hypercube (5p) #22

emlun opened this issue Sep 18, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@emlun
Copy link
Collaborator

emlun commented Sep 18, 2014

#1.3 The Hypercube (5p)

Extrauppgift 1.4 (5p) Använd mallar för att implementera en klass
Hypercube som hanterar liksidiga matriser med godtycklig dimension. Ta hjälp
av Matrix ellerVector för implementationen. Exempel:

Hypercube<3> n(7);                             // kub med 7*7*7 element
Hypercube<6> m(5);                             // sex dimensioner, 5*5*...*5 element
m[1][3][2][1][4][0] = 7;

Hypercube<3> t(5);
t = m[1][3][2];                                // tilldela med del av m
t[1][4][0] = 2;                                // ändra t, ändra inte m
std::cout << m[1][3][2][1][4][0] << std::endl; // 7
std::cout << t[1][4][0] << std::endl;          // 2

När du har löst uppgiften, tänk efter hur du kan göra en elegant lösning på
10-15 rader. Redovisa helst en elegant lösning men en elegant tankegång kan
också godkännas.

@emlun emlun added the extra label Sep 18, 2014
@emlun emlun added this to the Lab1 milestone Sep 18, 2014
@emlun emlun changed the title 1.4 The Hypercube (5p) 1.3 The Hypercube (5p) Sep 26, 2014
@emlun
Copy link
Collaborator Author

emlun commented Sep 26, 2014

This is done, right @ZetaTwo?

@ZetaTwo
Copy link
Owner

ZetaTwo commented Sep 26, 2014

Yes

@emlun emlun closed this as completed Sep 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants