traitecoevo / plant

Trait-Driven Models of Ecology and Evolution :evergreen_tree:
https://traitecoevo.github.io/plant
53 stars 20 forks source link

what to call height? #223

Closed rafaqz closed 1 year ago

rafaqz commented 4 years ago

height is very strategy specific as we have discussed. But size is already a common c++ function so it would be confusing in a lot of places.

What about individual_size or something?

dfalster commented 4 years ago

Hmm, that's a hard one. The apple thesaurus suggests

dimensions, measurements, proportions, magnitude, largeness, bigness, bulk, immensity, amplitude, hugeness, vastness.

Nahh.

individual_size is good its specific. But long so annoying to type. Does that mean on R side everything previously called height will now be individual_size?

rafaqz commented 4 years ago

Yeah its too long, but I had the same reaction to the thesaurus. Guess that is why size is already used for everything lol... The state name can still be "size", but R will have methods size as well so it would be confusing.

indsize getsize plantsize ?

dfalster commented 4 years ago

individual_size maybe best.

aornugent commented 4 years ago

I'd particularly like to be able to change state names as part of a strategy:

  static std::vector<std::string> state_names() {
    return  std::vector<std::string>({
      "bigness",
      "mortality",
      "fecundity"
      });
  }

On the R side they'd be accessed with getters and setters

p <- K93_Plant()
p$state("bigness")

and we can keep using fixed state indexes the C++ side. Then SIZE_INDEX might even be ok (see: https://github.com/traitecoevo/plant/issues/215).