USC-NSL / Computational-Agroecology

6 stars 1 forks source link

initial plant_container and soil_container. #92

Closed tszxxx closed 5 years ago

tszxxx commented 5 years ago

Including using third-party kd-tree library instead of our implementation.

ralphchung commented 5 years ago

Two things I want to mention:

tszxxx commented 5 years ago

Two things I want to mention:

You have a kDims and you use it to do kd-tree-related things all the time. On the other hand, each plant has its dimension. I am not quite sure if you allow a position to have more dimensions than kDims. One of the things you will be doing in a few days is to merge these two containers back to the terrain. As you will be noticing, there is already a struct called Coordinate in the terrain which is used to represent locations. Either remove it and use vectors to store location information or change it to fit into the plant container and soil container. Personally, I prefer the latter one. I am welcome to discuss.

For the first question, we allow the representation of plants' position has more than kDims, but when we try to build kd-tree, we set up the kDims and use it without any change.

ralphchung commented 5 years ago

@tszxxx Please check these issues again. Thanks.

ralphchung commented 5 years ago

@tszxxx I have made some changes. Some of them is refactor, and I fixed a bug as well. Please check them. Feel free to leave any comments.