Closed huanglangwen closed 4 years ago
Thank you for saying this. Let s agree on these guidelines and some basic clean coding (hard to understand var names like "x" that are not descriptive but I guess you all know this).
Since we do not do any matrix calculation and just use a data structure like std::vector<std::vestor, double>>, I would suggest something like boost.MultiArray (https://www.boost.org/doc/libs/1_67_0/libs/multi_array/doc/user.html).
I completely agree that we should use one coding style for easier collaboration. Google one seems good, I am okay with it. Just have in mind that perhaps not everybody used it before and we are not going to have a review system for every commit, so if an error slips here or there I think everybody should feel free to correct/rename things so that they are consistent with the rest of the project.
Additionally, I see your point for using something other than C-Style raw matrices. Since I did not use much more than vectors and matrices in the past, I will leave it to you guys to decide which one of the suggested (or something else) you prefer, I 'll make sure to adapt and learn how to use it.
@spaceben Yeah, boost.multiarray
looks great. Is there a way to use boost.multiarray
without compiling the whole boost stuff? because boost library is so huge. I also found another high performance ndarray library Blitz++
and it is in active development.
@kosta777 Actually, github has such automatic style checker (https://github.com/marketplace/codefactor/plan/MDIyOk1hcmtldHBsYWNlTGlzdGluZ1BsYW45NzE=#pricing-and-setup https://support.codefactor.io/i24-analysis-tools-open-source) and it is free!
@huanglangwen Sweet, I ll set it up for this repo!
Just checked Blitz++
for a second time, it seems it hasn’t updated features for a while. Eigen
is still by far the most active one, though it might be too heavy.
Did we decide on Eigen or boost for our matrix library? I see that @huanglangwen merged Eigen changes yet @spaceben's branch is using boost::multiarray.
I think we should stick to a certain coding style like Google’s (https://google.github.io/styleguide/cppguide.html since it is the most popular one) in order to collaborate effectively. Luckily, many linter programs like
clang-tidy
andclang-format
could help check that, and many IDEs like VS, VSCode, CLion could also do that.Also, since we will mainly play with matrices, maybe it’s better to use
Eigen
library instead of C-Style raw matrices. We could benefit from its vectorizedmax
function and possibly more.What do you guys think? @kosta777 @hanyao8 @spaceben