Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicolasvasilache/94466417703d11979b18e19e1dcfd95e to your computer and use it in GitHub Desktop.
Save nicolasvasilache/94466417703d11979b18e19e1dcfd95e to your computer and use it in GitHub Desktop.
TODO for ownership model
1. hide children & use API
2. move from SPtr to *
3. uniformize API + consts
std::vector<int> childPos(const ScheduleTree* relativeRoot) const;
// ScheduleTreeSPtr getChildAtPos(const std::vector<int>& prefix);
std::vector<ScheduleTree*> ancestors(ScheduleTree* relativeRoot);
std::vector<const ScheduleTree*> ancestors(const ScheduleTree* relativeRoot) const;
//ScheduleTree* child(int pos);
ScheduleTree* child(vector<int> pos);
ScheduleTree* ancestor(const ScheduleTree* relativeRoot, int generation);
std::vector<int> getPositionIn(const ScheduleTree* relativeRoot,
const ScheduleTree* tree) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment