-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/tags as template args #512
Conversation
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset_handler.hpp
Outdated
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/common/common.hpp
Outdated
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/main_model.hpp
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset_handler_fwd.hpp
Outdated
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/component/load_gen.hpp
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/component/power_sensor.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
This reverts commit a8b8462. Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
aea940b
to
d2c36cc
Compare
power_grid_model_c/power_grid_model/include/power_grid_model/common/common.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read the suggestions.
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tons of repeated changes, I can see why you were frustrated ;) One minor suggestion: why do we not already declare
using SymComplexValue = ComplexValue<symmetric_t>; using AsymComplexValue = ComplexValue<asymmetric_t>;
throughout the code? This is just one instance.
all comments resolved, no new comments + nitish approved
out of scope of this ticket. TBD in next refinement |
replace bool template args with a named tag for comprehensibility
This is something that I've been looking into for a long time now. Dev work on #486 kept getting slower and slower because I was struggling to forward the
true
andfalse
types. I ended up getting frustrating myself so much that I decided to go ahead with this change.Example for illustration
becomes
This makes types like
RealValue<symmetric_t>
and functionsget_output<asymmetric_t>
much more comprehensible than existingRealValue<false>
andget_output<false>
, resp.Example on datasets to really show why we need this
DataPointer
usesis_const
DataHandler
usesdata_mutable
this is confusing, because in one case
true
meansconst
and in the othertrue
meansmutable
Introduced constructs
true
value, and one representing the oldfalse
valuetag
concept is created that matches on only those two tag types and nothing else. This is equivalent to thebool
part of the template parameter declarationconstexpr bool
is created to access thetrue
respfalse
value of the tag typesChanged constructs
bool sym
for calculation symmetry and object symmetrybool is_const
for the data setbool data_mutable
for the data set handlerbool indptr_mutable
for the data set handlerbool is_gen
for load/gen