Mentions légales du service

Skip to content
Snippets Groups Projects
Forked from aevol / aevol
Source project has a limited visibility.
  • Théotime Grohens's avatar
    7dc94eec
    Add asserts to Fuzzy::add_point() · 7dc94eec
    Théotime Grohens authored
    This commit adds asserts to ensure that the preconditions on
    the points_ list are met when calling the function, namely:
    - the list has at least two elements
    - the first and last element are at abscissas X_MIN and X_MAX
    
    Moreover, this commit moves the (p != points_.begin()) check
    out of the if clause, and into an assert as well.
    
    This ensures that if a bug happens here again, we will catch
    it instead of sweeping it under the rug.
    7dc94eec
    History
    Add asserts to Fuzzy::add_point()
    Théotime Grohens authored
    This commit adds asserts to ensure that the preconditions on
    the points_ list are met when calling the function, namely:
    - the list has at least two elements
    - the first and last element are at abscissas X_MIN and X_MAX
    
    Moreover, this commit moves the (p != points_.begin()) check
    out of the if clause, and into an assert as well.
    
    This ensures that if a bug happens here again, we will catch
    it instead of sweeping it under the rug.