Seite 1 von 1

Exercise 9 Task 1

Verfasst: 17. Jan 2018 12:30
von Mario Trageser
Hi,

can we assume, that we have a graph without cycles, so that each node can be seen as the root of a sub graph?
Is it allowed, that a val in a trait is annotated with @ParentAccess? Or doesn't a val count as a method?

Kind regards,
Mario

Re: Exercise 9 Task 1

Verfasst: 19. Jan 2018 17:04
von meichholz
Hi,
Mario Trageser hat geschrieben:
17. Jan 2018 12:30
Hi,

can we assume, that we have a graph without cycles, so that each node can be seen as the root of a sub graph?
No, the graph can contain cycles.
Mario Trageser hat geschrieben:
17. Jan 2018 12:30
Is it allowed, that a val in a trait is annotated with @ParentAccess? Or doesn't a val count as a method?
@ParentAccess on a val is not okay, since the structure may change.

Best,
Matthias

Re: Exercise 9 Task 1

Verfasst: 19. Jan 2018 18:30
von LorenzB
meichholz hat geschrieben:
19. Jan 2018 17:04
Mario Trageser hat geschrieben:
17. Jan 2018 12:30
can we assume, that we have a graph without cycles, so that each node can be seen as the root of a sub graph?
No, the graph can contain cycles.
I think "with cycles" means that there is no Container which contains itself, is that true?

Re: Exercise 9 Task 1

Verfasst: 22. Jan 2018 11:06
von meichholz
Hi,
LorenzB hat geschrieben:
19. Jan 2018 18:30
I think "with cycles" means that there is no Container which contains itself, is that true?
Yes, that's true.

Best,
Matthias