1. 23 May, 2017 11 commits
  2. 29 Apr, 2017 4 commits
    • Jason Rhinelander's avatar
      Member ids: global, permanent; no implicit conversion · 05aae08d
      Jason Rhinelander authored
      This changes several things related to the handling of member ids.
      This is an API-breaking change, but cleans up some of the eris_id_t
      handling.  Making SharedMember and Member implicit convertible to
      eris_id_t everywhere was a mistake; this commit corrects it by
      introducing an implicit-converting object in those places where
      accepting either eris_id_t or a Member is desirable, without leaving
      implicit conversion to integer semantics in place everywhere else.
      Member and SharedMember<T> are no longer implicitly convertible
      to eris_id_t.
      Assigned member id()'s are now permanent and globally unique (rather
      than just within-Simulation unique), and are assigned when the Member is
      constructed and never unassigned.
      SharedMember<T> is now *explicitly* convertible to bool, but the meaning
      has changed somewhat: it no longer means "in a simulation" but now just
      "has a Member", like std::shared_ptr.  Thus shared members without a
      simulation used to be false in boolean context (which was via the
      eris_id_t) but are now true.
      SharedMember equality and inequality now work differently: since member
      ids are never unassigned and are global equality between shared members
      now works as expected across in- and out-of-simulation members.
      Previously `a == a` was false when `a` was not in a simulation.
      Equality is newly also true for null shared members: that is,
      `SharedMember<Member>() == SharedMember<Member>()` is true when both are
      nullptr members.  If just one is null, the comparison is false;
      otherwise the comparison comes down to id() values.  `operator <` now
      treats all nullptr members as if they had an id() of 0 (real id() values
      start at 1).
      To limit some of the compatibility annoyance, various methods like
      remove(), dependsOn(), and many of the methods in Bundle now accept a
      MemberID object (defined in types.hpp) instead of an eris_id_t that is
      implicitly convertible to and from an eris_id_t, and from anything with
      a direct or indirect id() method.
      Since this changes breaks some compatibility already, at the same time
      this also removes the second argument (the old id) from
      Member::weakDepRemoved() since the concept of an "old" id no longer
      exists.  (The member keeps its id even if removed and/or readded to a
    • Jason Rhinelander's avatar
      Switch time types to eris_time_t · 5bfbe410
      Jason Rhinelander authored
      This silences a clang signed-compare warning
    • Jason Rhinelander's avatar
    • Jason Rhinelander's avatar
      Added container versions of add and supplemental · e019217e
      Jason Rhinelander authored
      add(container) can be much more efficient than calling add(el) for each
      container element: if one of the adds fails, we can release the lock,
      add all remaining elements, then reestablish the whole lock; thus there
      is at most one blocking waiting for locking, while the loop approach
      could require `n` blocking waits.
  3. 26 Apr, 2017 3 commits
  4. 25 Apr, 2017 5 commits
    • Jason Rhinelander's avatar
      Inheritance fixes · 8939272a
      Jason Rhinelander authored
      - Make default constructor protected so that it is available to
      - Construct a std::shared_ptr rather than using std::make_shared so
        that subclasses can declare eris::Simulation a friend and support
        instance creation via eris::Simulation::create<Subclass>(...)
    • Jason Rhinelander's avatar
      Make run/add/remove virtual · 308ecc20
      Jason Rhinelander authored
    • Jason Rhinelander's avatar
    • Jason Rhinelander's avatar
      Allow Simulation inheritance · 8c807997
      Jason Rhinelander authored
      This allows Simulation to be used via inheritance as an alternative to
      composition.  This, in particular, allows members to always access
      their owning simulation, while without this they had both the
      simulation (via the internal eris weak_ptr) *and* some sort of local
      reference to the Simulation-containing class (for simulation-specific
      Allowing this via inheritance makes life easy: members can now get to
      the simulation-specific bits by casting the simulation to the local
      subclass name.
    • Jason Rhinelander's avatar
      Fix version in comments · 1ddd0ea4
      Jason Rhinelander authored
  5. 12 Apr, 2017 1 commit
    • Jason Rhinelander's avatar
      Inline Member defs; add simT() alias · 6afb4593
      Jason Rhinelander authored
      I used to think it was cleaner to put non-trivial definitions later, but
      don't think I agree anymore (at least not for very short ones like
      these); move them into the class definition proper.
      Add simT() alias for simulation()->t(), which is rather annoying to
      type out.
  6. 07 Nov, 2016 3 commits
  7. 06 Nov, 2016 2 commits
  8. 27 Oct, 2016 2 commits
  9. 04 Oct, 2016 1 commit
    • Jason Rhinelander's avatar
      single_peak_search: return struct · f3ccc293
      Jason Rhinelander authored
      Returning just the argmax is sort of inconvenient when the max is always
      wanted: this returns a struct that has both .max and .arg elements.  It
      should retain backwards compatibility in most cases by making the struct
      implicitly convertible to a double, yielding the `.arg` value, the same
      as before.
  10. 01 Oct, 2016 1 commit
  11. 25 Sep, 2016 1 commit
  12. 20 Sep, 2016 1 commit
  13. 18 Sep, 2016 1 commit
  14. 17 Sep, 2016 1 commit
    • Jason Rhinelander's avatar
      Added eris/utils.hpp · 12677ad6
      Jason Rhinelander authored
      This class is for programming utility functions, as opposed to
      algorithm which is for C++ implementations of various algorithms.
      It contains a new C++14-compatible index_sequence; it also takes the
      range() function from algorithms.hpp, since it's really about C++
      programming, not an algorithm.
  15. 26 Aug, 2016 1 commit
  16. 24 Aug, 2016 1 commit
  17. 10 Aug, 2016 1 commit
    • Jason Rhinelander's avatar
      Fixed update exception output; minor fixes · 907350b8
      Jason Rhinelander authored
      - don't declare things "virtual override", just use "override" instead
        (you can't override something that isn't virtual, and an override
        doesn't stop the virtualness of the method).
      - RestrictionProxy objects don't need to be protected