From c98552248f3500103dc46960c3d7d97226889208 Mon Sep 17 00:00:00 2001 From: Akira MATSUDA Date: Sun, 1 Dec 2019 17:53:13 +0900 Subject: [PATCH] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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.