diff --git a/README.md b/README.md index ed000d0..1f83ad8 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ Add `#include "IntervalTree.h"` to the source files in which you will use the in To make an IntervalTree to contain objects of class T, use: ```c++ -vector > intervals; +vector > intervals; T a, b, c; -intervals.push_back(Interval(2, 10, a)); -intervals.push_back(Interval(3, 4, b)); -intervals.push_back(Interval(20, 100, c)); -IntervalTree tree; -tree = IntervalTree(intervals); +intervals.push_back(Interval(2, 10, a)); +intervals.push_back(Interval(3, 4, b)); +intervals.push_back(Interval(20, 100, c)); +IntervalTree tree; +tree = IntervalTree(std::move(intervals)); ``` Now, it's possible to query the tree and obtain a set of intervals which are contained within the start and stop coordinates.