1. 09 Aug, 2018 1 commit
  2. 08 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add missing Hash function for List/UList (issue #966) · dd9ecd49
      Mark Olesen authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      - added SymmHash to Pair, for use when order is unimportant.
      STYLE: use string::hash() more consistently
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
  3. 30 May, 2018 1 commit
  4. 19 Mar, 2018 1 commit
  5. 28 Feb, 2018 1 commit
  6. 09 Feb, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: simplify hashing to use struct instead of class · 3e3c9739
      Mark Olesen authored
      - more consistent with STL practices for function classes.
      - string::hash function class now operates on std::string rather
        than Foam::string since we have now avoided inadvertent use of
        string conversion from int in more places.
  7. 25 Jan, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improved swap/transfer methods for FixedList · d029f4c5
      Mark Olesen authored
      - the transfer method was previously a copy
      - use std::reverse_iterator adaptors in FixedList
        This greatly reduces the amount of code and now avoids the array-bounds
        warning for FixedList::rend()
      - use pointer arithmetic instead of dereferencing the internal array
  8. 27 Nov, 2017 1 commit
    • Mark Olesen's avatar
      ENH: several improvements for linked-lists · cc5f30f2
      Mark Olesen authored
      - support move construct/assignment for linked-lists themselves
        and when moving into a 'normal' list
      - better consistency with begin/end signatures and the various
      - for indirect linked-lists, provide iterator access to the underlying
        data element address:   iter.get()  vs  &(iter())
      - add standard '->' indirection for iterators (as per normal STL
  9. 04 Nov, 2017 1 commit
  10. 29 Oct, 2017 1 commit
    • Mark Olesen's avatar
      ENH: consistent reverse iterator definitions for UList and FixedList · cd46cb70
      Mark Olesen authored
      - consistent with C++ STL conventions, the reverse iterators should
        use operator++ to transit the list from rbegin() to rend().
        The previous implementation used raw pointers, which meant that they
        had the opposite behaviour: operator-- to transit from rbegin() to
        The updated version only has operator++ defined, thus the compiler
        should catch any possible instances where people were using the old
        (incorrect) versions.
      - updated forAllReverseIters() and forAllConstReverseIters() macros to
        be consistent with new implementation and with C++ STL conventions.
  11. 20 Sep, 2017 1 commit
    • Mark Olesen's avatar
      ENH: update List and DynamicList methods (issue #595) · 049617d0
      Mark Olesen authored
      - improve functional compatibility with DynList (remove methods)
        * eg, remove an element from any position in a DynamicList
        * reduce the number of template parameters
        * remove/subset regions of DynamicList
      - propagate Swap template specializations for lists, hashtables
      - move construct/assignment to various containers.
      - add find/found methods for FixedList and UList for a more succinct
        (and clearer?) usage than the equivalent global findIndex() function.
      - simplify List_FOR_ALL loops
  12. 14 May, 2017 1 commit
    • Mark Olesen's avatar
      ENH: avoid std::distance for std::initializer_list · 0c53a815
      Mark Olesen authored
      - std::initializer_list has its own size() method, so no need to use
      STYLE/BUG: use separate iterator de-reference and increment in List
      - avoids unnecessary copying of iterators, and avoids any potentially
        odd behaviour with the combination with incrementing.
      ENH: support construct from iterator pair for DynamicList, SortableList
  13. 29 Apr, 2017 1 commit
    • Mark Olesen's avatar
      ENH: further refinement to edge methods · 1d9b311b
      Mark Olesen authored
      - more hash-like methods.
        Eg, insert/erase via lists, clear(), empty(),...
      - minVertex(), maxVertex() to return the smallest/largest label used
      - improved documentation, more clarification about where/how negative
        point labels are treated.
  14. 10 Feb, 2017 1 commit
    • Mark Olesen's avatar
      ENH: support ASCII List output on a single-line · e3d9084c
      Mark Olesen authored
      - Introduce writeList(Ostream&, label) method in various List classes to
        provide more flexibility and avoid hard-coded limits when deciding if a
        list is too long and should be broken up into multiple lines (ASCII only).
      - The old hard-code limit (10) is retained in the operator<< versions
      - This functionality is wrapped in the FlatOutput output adapter class
        and directly accessible via the 'flatOutput()' function.
          #include "ListOps.H"
          Info<< "methods: " << flatOutput(myLongList) << endl;
          // OR
          Info<< "methods: ";
          myLongList.writeList(os) << endl;
  15. 08 Feb, 2017 2 commits
  16. 12 Aug, 2016 1 commit
  17. 11 Aug, 2016 1 commit
  18. 05 Aug, 2016 1 commit
  19. 26 Apr, 2016 3 commits
  20. 28 Feb, 2016 1 commit
  21. 10 Jan, 2016 2 commits
  22. 14 Aug, 2011 1 commit
  23. 19 Jan, 2011 1 commit
  24. 14 Jan, 2011 1 commit
  25. 07 Jan, 2011 1 commit
  26. 05 Jan, 2011 2 commits
  27. 28 Jul, 2010 1 commit
  28. 29 Mar, 2010 1 commit
  29. 25 Nov, 2009 1 commit
    • Mark Olesen's avatar
      Lists get first() and last() member functions · b2d7439b
      Mark Olesen authored
      - this builds on Mattijs' commit 968f0bbd but with a first()
        as well.
      - Added both to FixedList, IndirectList, UIndirectList and *PtrList and
        since they can certainly be useful there. Did not add to BiIndirectList,
        since I'm not sure what it should mean there. Did not add to PackedList,
        since it's not clear how useful they'd be yet in these contexts (and I'm
        not sure how it would interact with the iterator proxy implementation).
      - Note: STL defines front() and back() for these methods.
  30. 03 Nov, 2009 1 commit
  31. 22 Jun, 2009 1 commit
  32. 04 Mar, 2009 2 commits
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      Switched from old hashing functions to use Bob Jenkins' hash routine · 17548296
      Mark Olesen authored
      - If the underlying type is contiguous, FixedList hashes its storage directly.
      - Drop labelPairHash (non-commutative) from fvMeshDistribute since
        FixedList::Hash does the right thing anyhow.
      - Hash<edge> specialization is commutative, without multiplication.
      - Hash<triFace> specialization kept multiplication (but now uLabel).
        There's not much point optimizing it, since it's not used much anyhow.
      Misc. changes
      - added StaticAssert to NamedEnum.H
      - label.H / uLabel.H : define FOAM_LABEL_MAX, FOAM_ULABEL_MAX with the
        values finally used for the storage.  These can be useful for pre-processor
        checks elsewhere (although I stopped needing them in the meantime).
  33. 27 Feb, 2009 2 commits
    • Mark Olesen's avatar
      StaticAssert added · 106d417d
      Mark Olesen authored
      - catch people using silly template sizes for FixedList, PackedList
    • Mark Olesen's avatar
      Preliminary work on hashing · 576d9388
      Mark Olesen authored
      - Hash returns unsigned
      - FixedList templated on unsigned int
      - include uLabel.H in UList, HashTable etc. so the output function is know