Closed tszxxx closed 5 years ago
for that the class plant is an abstract class, so it can not be inserted into a vector, so we can not build kd-tree on it.
Since it is an abstract class, we could instead insert them into a vector<shared_ptr<Plant>>. Then, we have to define our own comparator. I think that could solve your problem.
vector<shared_ptr<Plant>>
for that the class plant is an abstract class, so it can not be inserted into a vector, so we can not build kd-tree on it.