Skip to content

fix(Refactoring): file reorganisation#34

Merged
BotellaA merged 5 commits into
nextfrom
file_reorganisation
Mar 24, 2026
Merged

fix(Refactoring): file reorganisation#34
BotellaA merged 5 commits into
nextfrom
file_reorganisation

Conversation

@francoisbonneau

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 320 concern(s)
  • bindings/python/src/common.hpp:33:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       33 | namespace pybind11
          | ^~~~~~~~~~~~~~~~~~
       34 | {
          | ~
       35 |     namespace detail
          |     ~~~~~~~~~~~~~~~~
          |     namespace pybind11::detail
  • include/geode/stochastic/sampling/direct/bounding_box_sampler.hpp:41:11: warning: [cppcoreguidelines-special-member-functions]

    class 'BoundingBoxSampler' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       41 |     class BoundingBoxSampler
          |           ^
  • include/geode/stochastic/sampling/mcmc/energy_terms/energy_term_collection.hpp:97:24: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

       97 |             const auto it = set_to_terms_.find( set_id );
          |                        ^
  • include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:120:30: warning: [readability-function-cognitive-complexity]

    function 'delta_log_change' has cognitive complexity of 12 (threshold 10)

      120 |         [[nodiscard]] double delta_log_change(
          |                              ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:125:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      125 |             if( !this->is_targeted_set( old_object_id.set_id )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:126:17: note: +1
      126 |                 || !this->is_targeted_set( new_object.set_id ) )
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:139:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      139 |             for( auto neigh_id : old_neighbors )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:144:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      144 |                 if( SpatialDomainChecker< ObjectType >::is_anchored_in_domain(
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:146:21: note: +1
      146 |                     || SpatialDomainChecker<
          |                     ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:159:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      159 |             for( auto neigh_id : new_neighbors )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:161:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      161 |                 if( old_object_id == neigh_id )
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:168:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      168 |                 if( SpatialDomainChecker< ObjectType >::is_anchored_in_domain(
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/energy_terms/pairwise_term.hpp:170:21: note: +1
      170 |                     || SpatialDomainChecker<
          |                     ^
  • include/geode/stochastic/sampling/mcmc/helpers/fracture_simulation_runner.hpp:60:9: warning: [modernize-use-nodiscard]

    function 'string' should be marked [[nodiscard]]

       60 |         std::string string() const
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/helpers/fracture_simulation_runner.hpp:87:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       87 |         FractureSimulationRunner( const SpatialDomain< 2 >& domain )
          |         ^
          |         explicit 
  • include/geode/stochastic/sampling/mcmc/helpers/fracture_simulation_runner.hpp:217:25: warning: [cppcoreguidelines-avoid-magic-numbers]

    0.5 is a magic number; consider replacing it with a named constant

      217 |                         0.5 * this->domain_.smallest_length(),
          |                         ^
  • include/geode/stochastic/sampling/mcmc/helpers/fracture_simulation_runner.hpp:247:41: warning: [readability-identifier-length]

    variable name 'id' is too short, expected at least 3 characters

      247 |                 for( const auto& [name, id] : set_name_to_uuid_ )
          |                                         ^
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:32:17: warning: [performance-enum-size]

    enum 'MHDecision' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size

       32 |     enum struct MHDecision
          |                 ^
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:32:17: warning: [readability-identifier-naming]

    invalid case style for enum 'MHDecision'

       32 |     enum struct MHDecision
          |                 ^~~~~~~~~~
          |                 MH_DECISION
       33 |     {
       34 |         Accepted,
       35 |         Rejected,
       36 |         Undecided
       37 |     };
       38 | 
       39 |     template < typename ObjectType >
       40 |     struct StepResult
       41 |     {
       42 |         MHDecision decision{ MHDecision::Undecided };
          |         ~~~~~~~~~~           ~~~~~~~~~~
          |         MH_DECISION          MH_DECISION
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:34:9: warning: [readability-identifier-naming]

    invalid case style for enum constant 'Accepted'

       34 |         Accepted,
          |         ^~~~~~~~
          |         accepted
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:35:9: warning: [readability-identifier-naming]

    invalid case style for enum constant 'Rejected'

       35 |         Rejected,
          |         ^~~~~~~~
          |         rejected
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:36:9: warning: [readability-identifier-naming]

    invalid case style for enum constant 'Undecided'

       36 |         Undecided
          |         ^~~~~~~~~
          |         undecided
       37 |     };
       38 | 
       39 |     template < typename ObjectType >
       40 |     struct StepResult
       41 |     {
       42 |         MHDecision decision{ MHDecision::Undecided };
          |                                          ~~~~~~~~~
          |                                          undecided
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:102:9: warning: [modernize-use-nodiscard]

    function 'beta' should be marked [[nodiscard]]

      102 |         double beta() const
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:107:31: warning: [readability-identifier-length]

    parameter name 'b' is too short, expected at least 3 characters

      107 |         void set_beta( double b )
          |                               ^
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:143:43: warning: [google-readability-braces-around-statements]

    statement should be inside braces

      143 |             if( std::isnan( log_accept ) )
          |                                           ^
          |                                            {
      144 |                 return 0.0;
          |                            
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:145:36: warning: [google-readability-braces-around-statements]

    statement should be inside braces

      145 |             if( log_accept >= 0.0 )
          |                                    ^
          |                                     {
      146 |                 return 1.0;
          |                            
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:149:39: warning: [google-readability-braces-around-statements]

    statement should be inside braces

      149 |             if( log_accept < LOG_MIN )
          |                                       ^
          |                                        {
      150 |                 return 0.0;
          |                            
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:155:9: warning: [modernize-use-nodiscard]

    function 'compute_log_accept' should be marked [[nodiscard]]

      155 |         const double compute_log_accept( const double deltaU,
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:155:9: warning: [readability-const-return-type]

    return type 'const double' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness

      155 |         const double compute_log_accept( const double deltaU,
          |         ^~~~~
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:158:20: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      158 |             return -beta_ * deltaU + proposal_probas.transition_probability();
          |                    ^~~~~~~~~~~~~~~
          |                    (              )
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:162:34: warning: [readability-function-size]

    function 'accept_or_reject' exceeds recommended size/complexity thresholds

      162 |         StepResult< ObjectType > accept_or_reject(
          |                                  ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:162:34: note: 5 parameters (threshold 4)
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:167:25: warning: [cppcoreguidelines-missing-std-forward]

    forwarding reference parameter 'apply_move' is never forwarded inside the function body

      167 |             ApplyMove&& apply_move ) const
          |                         ^
  • include/geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp:180:63: warning: [google-readability-braces-around-statements]

    statement should be inside braces

      180 |             if( step_result.decision == MHDecision::Accepted )
          |                                                               ^
          |                                                                {
      181 |                 apply_move( state, proposal );
          |                                               
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:38:31: warning: [cppcoreguidelines-avoid-magic-numbers]

    1000 is a magic number; consider replacing it with a named constant

       38 |         index_t realizations{ 1000 };
          |                               ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:39:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1000 is a magic number; consider replacing it with a named constant

       39 |         index_t metropolis_hasting_steps{ 1000 };
          |                                           ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:40:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    1000 is a magic number; consider replacing it with a named constant

       40 |         index_t burn_in_steps{ 1000 };
          |                                ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:44:9: warning: [modernize-use-nodiscard]

    function 'string' should be marked [[nodiscard]]

       44 |         std::string string() const
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:63:11: warning: [cppcoreguidelines-special-member-functions]

    class 'SimulationRunner' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       63 |     class SimulationRunner
          |           ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:66:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       66 |         SimulationRunner( const SpatialDomain< ObjectType::dim >& domain )
          |         ^
          |         explicit 
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:127:9: warning: [modernize-use-nodiscard]

    function 'state_statistics' should be marked [[nodiscard]]

      127 |         std::vector< double > state_statistics() const
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:142:9: warning: [modernize-use-nodiscard]

    function 'model_energy_term_names' should be marked [[nodiscard]]

      142 |         std::string model_energy_term_names() const
          |         ^
          |         [[nodiscard]] 
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:159:42: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'domain_' has protected visibility

      159 |         SpatialDomain< ObjectType::dim > domain_;
          |                                          ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:161:13: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'set_samplers_' has protected visibility

      161 |             set_samplers_;
          |             ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:163:36: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'ordered_energy_terms_' has protected visibility

      163 |         std::vector< geode::uuid > ordered_energy_terms_;
          |                                    ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:164:31: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'ordered_target_statistics_' has protected visibility

      164 |         std::vector< double > ordered_target_statistics_;
          |                               ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:166:44: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'energy_terms_collection_' has protected visibility

      166 |         EnergyTermCollection< ObjectType > energy_terms_collection_;
          |                                            ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:167:68: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'mh_sampler_' has protected visibility

      167 |         std::unique_ptr< geode::MetropolisHastings< ObjectType > > mh_sampler_;
          |                                                                    ^
  • include/geode/stochastic/sampling/mcmc/simulation_runner.hpp:169:34: warning: [cppcoreguidelines-non-private-member-variables-in-classes]

    member variable 'object_sets_' has protected visibility

      169 |         ObjectSets< ObjectType > object_sets_;
          |                                  ^
  • src/geode/stochastic/sampling/direct/bounding_box_sampler.cpp:39:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       39 |         Impl( const BoundingBox< dimension >& box )
          |         ^
          |         explicit 
  • src/geode/stochastic/sampling/direct/bounding_box_sampler.cpp:43:17: warning: [cppcoreguidelines-pro-bounds-constant-array-index]

    do not use array subscript when the index is not an integer constant expression

       43 |                 dist_coordinates_[dim].min_value = box.min().value( dim );
          |                 ^
  • src/geode/stochastic/sampling/direct/bounding_box_sampler.cpp:44:17: warning: [cppcoreguidelines-pro-bounds-constant-array-index]

    do not use array subscript when the index is not an integer constant expression

       44 |                 dist_coordinates_[dim].max_value = box.max().value( dim );
          |                 ^
  • src/geode/stochastic/sampling/direct/bounding_box_sampler.cpp:53:49: warning: [cppcoreguidelines-pro-bounds-constant-array-index]

    do not use array subscript when the index is not an integer constant expression

       53 |                     dim, engine.sample_uniform( dist_coordinates_[dim] ) );
          |                                                 ^
  • src/geode/stochastic/sampling/mcmc/energy_terms/intensity_term.cpp:100:20: warning: [readability-function-size]

    function 'IntensityTerm' exceeds recommended size/complexity thresholds

      100 |     IntensityTerm::IntensityTerm( std::string_view name,
          |                    ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/mcmc/energy_terms/intensity_term.cpp:100:20: note: 5 parameters (threshold 4)
  • src/geode/stochastic/sampling/random_engine.cpp:41:31: warning: [readability-identifier-length]

    parameter name 'x' is too short, expected at least 3 characters

       41 |     double normal_cdf( double x )
          |                               ^
  • src/geode/stochastic/sampling/random_engine.cpp:43:16: warning: [cppcoreguidelines-avoid-magic-numbers]

    0.5 is a magic number; consider replacing it with a named constant

       43 |         return 0.5 * std::erfc( -x / std::sqrt( 2.0 ) );
          |                ^
  • src/geode/stochastic/sampling/random_engine.cpp:43:49: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

       43 |         return 0.5 * std::erfc( -x / std::sqrt( 2.0 ) );
          |                                                 ^
  • src/geode/stochastic/sampling/random_engine.cpp:50:36: warning: [readability-identifier-length]

    parameter name 'p' is too short, expected at least 3 characters

       50 |     double normal_quantile( double p )
          |                                    ^
  • src/geode/stochastic/sampling/random_engine.cpp:56:29: warning: [readability-identifier-length]

    variable name 'a1' is too short, expected at least 3 characters

       56 |         static const double a1 = -3.969683028665376e+01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:57:29: warning: [readability-identifier-length]

    variable name 'a2' is too short, expected at least 3 characters

       57 |         static const double a2 = 2.209460984245205e+02;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:58:29: warning: [readability-identifier-length]

    variable name 'a3' is too short, expected at least 3 characters

       58 |         static const double a3 = -2.759285104469687e+02;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:59:29: warning: [readability-identifier-length]

    variable name 'a4' is too short, expected at least 3 characters

       59 |         static const double a4 = 1.383577518672690e+02;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:60:29: warning: [readability-identifier-length]

    variable name 'a5' is too short, expected at least 3 characters

       60 |         static const double a5 = -3.066479806614716e+01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:61:29: warning: [readability-identifier-length]

    variable name 'a6' is too short, expected at least 3 characters

       61 |         static const double a6 = 2.506628277459239e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:63:29: warning: [readability-identifier-length]

    variable name 'b1' is too short, expected at least 3 characters

       63 |         static const double b1 = -5.447609879822406e+01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:64:29: warning: [readability-identifier-length]

    variable name 'b2' is too short, expected at least 3 characters

       64 |         static const double b2 = 1.615858368580409e+02;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:65:29: warning: [readability-identifier-length]

    variable name 'b3' is too short, expected at least 3 characters

       65 |         static const double b3 = -1.556989798598866e+02;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:66:29: warning: [readability-identifier-length]

    variable name 'b4' is too short, expected at least 3 characters

       66 |         static const double b4 = 6.680131188771972e+01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:67:29: warning: [readability-identifier-length]

    variable name 'b5' is too short, expected at least 3 characters

       67 |         static const double b5 = -1.328068155288572e+01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:69:29: warning: [readability-identifier-length]

    variable name 'c1' is too short, expected at least 3 characters

       69 |         static const double c1 = -7.784894002430293e-03;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:70:29: warning: [readability-identifier-length]

    variable name 'c2' is too short, expected at least 3 characters

       70 |         static const double c2 = -3.223964580411365e-01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:71:29: warning: [readability-identifier-length]

    variable name 'c3' is too short, expected at least 3 characters

       71 |         static const double c3 = -2.400758277161838e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:72:29: warning: [readability-identifier-length]

    variable name 'c4' is too short, expected at least 3 characters

       72 |         static const double c4 = -2.549732539343734e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:73:29: warning: [readability-identifier-length]

    variable name 'c5' is too short, expected at least 3 characters

       73 |         static const double c5 = 4.374664141464968e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:74:29: warning: [readability-identifier-length]

    variable name 'c6' is too short, expected at least 3 characters

       74 |         static const double c6 = 2.938163982698783e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:76:29: warning: [readability-identifier-length]

    variable name 'd1' is too short, expected at least 3 characters

       76 |         static const double d1 = 7.784695709041462e-03;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:77:29: warning: [readability-identifier-length]

    variable name 'd2' is too short, expected at least 3 characters

       77 |         static const double d2 = 3.224671290700398e-01;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:78:29: warning: [readability-identifier-length]

    variable name 'd3' is too short, expected at least 3 characters

       78 |         static const double d3 = 2.445134137142996e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:79:29: warning: [readability-identifier-length]

    variable name 'd4' is too short, expected at least 3 characters

       79 |         static const double d4 = 3.754408661907416e+00;
          |                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:84:9: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

       84 |         double q, r;
          |         ^~~~~~~~~~~~
  • src/geode/stochastic/sampling/random_engine.cpp:84:16: warning: [cppcoreguidelines-init-variables]

    variable 'q' is not initialized

       84 |         double q, r;
          |                ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/stochastic/sampling/random_engine.cpp:84:16: warning: [readability-identifier-length]

    variable name 'q' is too short, expected at least 3 characters

  • src/geode/stochastic/sampling/random_engine.cpp:84:19: warning: [cppcoreguidelines-init-variables]

    variable 'r' is not initialized

       84 |         double q, r;
          |                   ^
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/stochastic/sampling/random_engine.cpp:84:19: warning: [readability-identifier-length]

    variable name 'r' is too short, expected at least 3 characters

  • src/geode/stochastic/sampling/random_engine.cpp:93:9: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

       93 |         else if( p > phigh )
          |         ^~~~~~~~~~~~~~~~~~~~
       94 |         {
          |         ~
       95 |             // upper tail
          |             ~~~~~~~~~~~~~
       96 |             q = std::sqrt( -2 * std::log( 1 - p ) );
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       97 |             return -( ( ( ( ( c1 * q + c2 ) * q + c3 ) * q + c4 ) * q + c5 ) * q
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       98 |                        + c6 )
          |                        ~~~~~~
       99 |                    / ( ( ( ( d1 * q + d2 ) * q + d3 ) * q + d4 ) * q + 1 );
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      100 |         }
          |         ~
      101 |         else
          |         ~~~~
      102 |         {
          |         ~
      103 |             // central region
          |             ~~~~~~~~~~~~~~~~~
      104 |             q = p - 0.5;
          |             ~~~~~~~~~~~~
      105 |             r = q * q;
          |             ~~~~~~~~~~
      106 |             return ( ( ( ( ( a1 * r + a2 ) * r + a3 ) * r + a4 ) * r + a5 ) * r
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      107 |                        + a6 )
          |                        ~~~~~~
      108 |                    * q
          |                    ~~~
  • src/geode/stochastic/sampling/random_engine.cpp:97:23: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

       97 |             return -( ( ( ( ( c1 * q + c2 ) * q + c3 ) * q + c4 ) * q + c5 ) * q
          |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    note: this fix will not be applied because it overlaps with another fix
  • src/geode/stochastic/sampling/random_engine.cpp:104:21: warning: [cppcoreguidelines-avoid-magic-numbers]

    0.5 is a magic number; consider replacing it with a named constant

      104 |             q = p - 0.5;
          |                     ^
  • src/geode/stochastic/sampling/random_engine.cpp:118:59: warning: [cppcoreguidelines-avoid-magic-numbers]

    32 is a magic number; consider replacing it with a named constant

      118 |                                                   seed >> 32 ),
          |                                                           ^
  • src/geode/stochastic/sampling/random_engine.cpp:118:59: warning: [hicpp-signed-bitwise]

    use of a signed integer operand with a binary bitwise operator

      118 |                                                   seed >> 32 ),
          |                                                        ~~ ^~
  • src/geode/stochastic/sampling/random_engine.cpp:119:45: warning: [cppcoreguidelines-avoid-magic-numbers]

    0xFFFFFFFF is a magic number; consider replacing it with a named constant

      119 |             static_cast< uint32_t >( seed & 0xFFFFFFFF ) };
          |                                             ^
  • src/geode/stochastic/sampling/random_engine.cpp:120:16: warning: [modernize-return-braced-init-list]

    avoid repeating the return type from the declaration; use a braced initializer list instead

      120 |         return std::seed_seq( seed_data.begin(), seed_data.end() );
          |                ^~~~~~~~~~~~~~                                    ~
          |                {                                                 }
  • src/geode/stochastic/sampling/random_engine.cpp:200:20: warning: [readability-identifier-naming]

    invalid case style for variable 'F_min'

      200 |             double F_min = std::isfinite( alpha ) ? normal_cdf( alpha ) : 0.0;
          |                    ^~~~~
          |                    f_min
      201 |             double F_max = std::isfinite( beta ) ? normal_cdf( beta ) : 1.0;
      202 | 
      203 |             // Clamp to avoid exact 0 or 1 (normal_quantile cannot handle them)
      204 |             F_min = std::max( F_min, geode::GLOBAL_EPSILON );
          |             ~~~~~             ~~~~~
          |             f_min             f_min
      205 |             F_max = std::min( F_max, 1.0 - geode::GLOBAL_EPSILON );
      206 | 
      207 |             OPENGEODE_EXCEPTION( F_min < F_max,
          |                                  ~~~~~
          |                                  f_min
      208 |                 "[Gaussian sampling] - truncation "
      209 |                 "range is extreme please check inputs" );
      210 | 
      211 |             // Sample uniform in [F_min, F_max]
      212 |             std::uniform_real_distribution< double > uniform( F_min, F_max );
          |                                                               ~~~~~
          |                                                               f_min
  • src/geode/stochastic/sampling/random_engine.cpp:201:20: warning: [readability-identifier-naming]

    invalid case style for variable 'F_max'

      201 |             double F_max = std::isfinite( beta ) ? normal_cdf( beta ) : 1.0;
          |                    ^~~~~
          |                    f_max
      202 | 
      203 |             // Clamp to avoid exact 0 or 1 (normal_quantile cannot handle them)
      204 |             F_min = std::max( F_min, geode::GLOBAL_EPSILON );
      205 |             F_max = std::min( F_max, 1.0 - geode::GLOBAL_EPSILON );
          |             ~~~~~             ~~~~~
          |             f_max             f_max
      206 | 
      207 |             OPENGEODE_EXCEPTION( F_min < F_max,
          |                                          ~~~~~
          |                                          f_max
      208 |                 "[Gaussian sampling] - truncation "
      209 |                 "range is extreme please check inputs" );
      210 | 
      211 |             // Sample uniform in [F_min, F_max]
      212 |             std::uniform_real_distribution< double > uniform( F_min, F_max );
          |                                                                      ~~~~~
          |                                                                      f_max
  • src/geode/stochastic/sampling/random_engine.cpp:216:31: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      216 |             return law.mean + law.standard_deviation * normal_quantile( u );
          |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                               (                                            )
  • src/geode/stochastic/sampling/random_engine.cpp:219:16: warning: [readability-function-cognitive-complexity]

    function 'sample_von_mises' has cognitive complexity of 12 (threshold 10)

      219 |         double sample_von_mises( const VonMises& law )
          |                ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:221:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      221 |             OPENGEODE_ASSERT(
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:9: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |         ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:221:13: note: +1
      221 |             OPENGEODE_ASSERT(
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:13: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/absl/base/optimization.h:189:55: note: expanded from macro 'ABSL_PREDICT_FALSE'
      189 | #define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
          |                                                       ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:222:42: note: +1
      222 |                 law.concentration >= 0.0 && std::isfinite( law.mean ),
          |                                          ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:228:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      228 |             if( law.concentration < geode::GLOBAL_EPSILON )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:237:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      237 |             if( law.concentration > LARGE_KAPPA )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:260:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      260 |             while( true )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:268:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      268 |                 if( u2 < c * ( 2.0 - c ) || u2 <= c * std::exp( 1.0 - c ) )
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:268:42: note: +1
      268 |                 if( u2 < c * ( 2.0 - c ) || u2 <= c * std::exp( 1.0 - c ) )
          |                                          ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:271:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      271 |                     if( sample_bernoulli( 0.5 ) )
          |                     ^
  • src/geode/stochastic/sampling/random_engine.cpp:231:42: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      231 |                 uniform_dist.max_value = 2.0 * M_PI;
          |                                          ^
  • src/geode/stochastic/sampling/random_engine.cpp:236:26: warning: [readability-identifier-naming]

    invalid case style for variable 'LARGE_KAPPA'

      236 |             const double LARGE_KAPPA = 1e3; // threshold, can be tuned
          |                          ^~~~~~~~~~~
          |                          large_kappa
      237 |             if( law.concentration > LARGE_KAPPA )
          |                                     ~~~~~~~~~~~
          |                                     large_kappa
  • src/geode/stochastic/sampling/random_engine.cpp:245:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      245 |                 return std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                           ^
  • src/geode/stochastic/sampling/random_engine.cpp:245:43: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      245 |                 return std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                           ^~~~~~~~~~~
          |                                           (         )
  • src/geode/stochastic/sampling/random_engine.cpp:245:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      245 |                 return std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                                       ^
  • src/geode/stochastic/sampling/random_engine.cpp:250:26: warning: [readability-identifier-length]

    variable name 'a' is too short, expected at least 3 characters

      250 |             const double a =
          |                          ^
  • src/geode/stochastic/sampling/random_engine.cpp:253:27: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      253 |                     1.0 + 4.0 * law.concentration * law.concentration );
          |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                           (                                          )
  • src/geode/stochastic/sampling/random_engine.cpp:254:26: warning: [readability-identifier-length]

    variable name 'b' is too short, expected at least 3 characters

      254 |             const double b =
          |                          ^
  • src/geode/stochastic/sampling/random_engine.cpp:256:26: warning: [readability-identifier-length]

    variable name 'r' is too short, expected at least 3 characters

      256 |             const double r = ( 1.0 + b * b ) / ( 2.0 * b );
          |                          ^
  • src/geode/stochastic/sampling/random_engine.cpp:258:20: warning: [cppcoreguidelines-init-variables]

    variable 'theta' is not initialized

      258 |             double theta;
          |                    ^    
          |                          = NAN
  • src/geode/stochastic/sampling/random_engine.cpp:262:24: warning: [readability-identifier-length]

    variable name 'u1' is too short, expected at least 3 characters

      262 |                 double u1 = sample_uniform( uniform_dist );
          |                        ^
  • src/geode/stochastic/sampling/random_engine.cpp:265:24: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

      265 |                 double c = law.concentration * ( r - f );
          |                        ^
  • src/geode/stochastic/sampling/random_engine.cpp:266:24: warning: [readability-identifier-length]

    variable name 'u2' is too short, expected at least 3 characters

      266 |                 double u2 = sample_uniform( uniform_dist );
          |                        ^
  • src/geode/stochastic/sampling/random_engine.cpp:268:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      268 |                 if( u2 < c * ( 2.0 - c ) || u2 <= c * std::exp( 1.0 - c ) )
          |                                ^
  • src/geode/stochastic/sampling/random_engine.cpp:271:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    0.5 is a magic number; consider replacing it with a named constant

      271 |                     if( sample_bernoulli( 0.5 ) )
          |                                           ^
  • src/geode/stochastic/sampling/random_engine.cpp:271:50: warning: [google-readability-braces-around-statements]

    statement should be inside braces

      271 |                     if( sample_bernoulli( 0.5 ) )
          |                                                  ^
          |                                                   {
      272 |                         theta = -theta;
          |                                        
  • src/geode/stochastic/sampling/random_engine.cpp:279:40: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      279 |             theta = std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                        ^
  • src/geode/stochastic/sampling/random_engine.cpp:279:40: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      279 |             theta = std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                        ^~~~~~~~~~~
          |                                        (         )
  • src/geode/stochastic/sampling/random_engine.cpp:279:52: warning: [cppcoreguidelines-avoid-magic-numbers]

    2.0 is a magic number; consider replacing it with a named constant

      279 |             theta = std::fmod( theta + 2.0 * M_PI, 2.0 * M_PI );
          |                                                    ^
  • src/geode/stochastic/sampling/random_engine.cpp:313:20: warning: [readability-identifier-naming]

    invalid case style for variable 'F_min'

      313 |             double F_min =
          |                    ^~~~~
          |                    f_min
      314 |                 std::max( normal_cdf( zmin ), geode::GLOBAL_EPSILON );
      315 |             double F_max =
      316 |                 std::min( normal_cdf( zmax ), 1.0 - geode::GLOBAL_EPSILON );
      317 | 
      318 |             OPENGEODE_EXCEPTION( F_min < F_max,
          |                                  ~~~~~
          |                                  f_min
      319 |                 "[Truncated LogNormal sampling] - truncation "
      320 |                 "range is extreme please chack inputs" );
      321 | 
      322 |             // Sample uniform in [Fmin, Fmax]
      323 |             std::uniform_real_distribution< double > uniform( F_min, F_max );
          |                                                               ~~~~~
          |                                                               f_min
  • src/geode/stochastic/sampling/random_engine.cpp:315:20: warning: [readability-identifier-naming]

    invalid case style for variable 'F_max'

      315 |             double F_max =
          |                    ^~~~~
          |                    f_max
      316 |                 std::min( normal_cdf( zmax ), 1.0 - geode::GLOBAL_EPSILON );
      317 | 
      318 |             OPENGEODE_EXCEPTION( F_min < F_max,
          |                                          ~~~~~
          |                                          f_max
      319 |                 "[Truncated LogNormal sampling] - truncation "
      320 |                 "range is extreme please chack inputs" );
      321 | 
      322 |             // Sample uniform in [Fmin, Fmax]
      323 |             std::uniform_real_distribution< double > uniform( F_min, F_max );
          |                                                                      ~~~~~
          |                                                                      f_max
  • src/geode/stochastic/sampling/random_engine.cpp:328:41: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      328 |             return std::exp( law.mean + law.standard_deviation * z );
          |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                         (                         )
  • src/geode/stochastic/sampling/random_engine.cpp:331:16: warning: [readability-function-cognitive-complexity]

    function 'sample_truncated_powerlaw' has cognitive complexity of 12 (threshold 10)

      331 |         double sample_truncated_powerlaw( const TruncatedPowerLaw& law )
          |                ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:333:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      333 |             OPENGEODE_ASSERT(
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:9: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |         ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:333:13: note: +1
      333 |             OPENGEODE_ASSERT(
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:13: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/absl/base/optimization.h:189:55: note: expanded from macro 'ABSL_PREDICT_FALSE'
      189 | #define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
          |                                                       ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:342:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      342 |             OPENGEODE_ASSERT( xmin < xmax, "Truncated power-law: min >= max" );
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:9: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |         ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:342:13: note: +1
      342 |             OPENGEODE_ASSERT( xmin < xmax, "Truncated power-law: min >= max" );
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/geode/basic/assert.hpp:107:13: note: expanded from macro 'OPENGEODE_ASSERT'
      107 |         if( ABSL_PREDICT_FALSE( !( condition ) ) )                             \
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/OpenGeode-16.3.1-rc.2-ubuntu/include/absl/base/optimization.h:189:55: note: expanded from macro 'ABSL_PREDICT_FALSE'
      189 | #define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
          |                                                       ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:349:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      349 |             if( std::abs( law.alpha - 1.0 ) > geode::GLOBAL_EPSILON )
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:354:25: note: +2, including nesting penalty of 1, nesting level increased to 2
      354 |                         ? std::pow( xmax, 1.0 - law.alpha )
          |                         ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:356:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      356 |                 if( !std::isfinite( xmax_pow ) )
          |                 ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:363:13: note: +1, nesting level increased to 1
      363 |             else
          |             ^
    /__w/OpenGeode-Stochastic/OpenGeode-Stochastic/src/geode/stochastic/sampling/random_engine.cpp:367:43: note: +2, including nesting penalty of 1, nesting level increased to 2
      367 |                     std::isfinite( xmax ) ? xmax : xmin * geode::GLOBAL_EPSILON;
          |                                           ^
  • src/geode/stochastic/sampling/random_engine.cpp:360:34: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      360 |                 return std::pow( u * ( xmax_pow - xmin_pow ) + xmin_pow,
          |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                  (                          )
  • src/geode/stochastic/sampling/random_engine.cpp:363:13: warning: [llvm-else-after-return]

    do not use 'else' after 'return'

      363 |             else
          |             ^~~~
      364 |             {
          |             ~
      365 |                 // alpha == 1
          |                 ~~~~~~~~~~~~~
      366 |                 const double xmax_eff =
          |                 ~~~~~~~~~~~~~~~~~~~~~~~
      367 |                     std::isfinite( xmax ) ? xmax : xmin * geode::GLOBAL_EPSILON;
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      368 |                 return xmin * std::pow( xmax_eff / xmin, u );
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      369 |             }
          |             ~
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:29:13: warning: [misc-use-internal-linkage]

    function 'init_object_set' can be made static or moved into an anonymous namespace to enforce internal linkage

       29 | geode::uuid init_object_set( geode::ObjectSets< geode::Point2D >& pattern )
          |             ^
          | static 
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:31:20: warning: [readability-identifier-length]

    variable name 'p1' is too short, expected at least 3 characters

       31 |     geode::Point2D p1{ { 0., 0. } };
          |                    ^
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:32:20: warning: [readability-identifier-length]

    variable name 'p2' is too short, expected at least 3 characters

       32 |     geode::Point2D p2{ { 1., 1. } };
          |                    ^
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:33:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    1.3 is a magic number; consider replacing it with a named constant

       33 |     geode::Point2D p_buffer{ { 1.3, 0.1 } };
          |                                ^
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:33:37: warning: [cppcoreguidelines-avoid-magic-numbers]

    0.1 is a magic number; consider replacing it with a named constant

       33 |     geode::Point2D p_buffer{ { 1.3, 0.1 } };
          |                                     ^
  • tests/stochastic/sampling/mcmc/energy_terms/test-density-term.cpp:36:25: warning: [hicpp-move-const-arg]

    std::move of the variable 'p1' of the trivially-copyable type 'geode::Point2D' (aka 'Point<2>') has no effect; remove std::move()

       36 |     pattern.add_object( std::move( p1 ), set_id, false );
          |                         ^~~~~~~~~~    ~

Have any feedback or feature suggestions? Share it here.

@BotellaA BotellaA merged commit 263b003 into next Mar 24, 2026
21 checks passed
@BotellaA BotellaA deleted the file_reorganisation branch March 24, 2026 16:30
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.19.5-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.19.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants