1. 27 Jan, 2010 1 commit
    • mattijs's avatar
      BUG: slicing of empty list · adc15181
      mattijs authored
      An empty list (m_) has no pointer so cannot be referenced. Instead we
      now return a null pointer (which is no problem for UList)
      adc15181
  2. 15 Dec, 2009 2 commits
  3. 08 Dec, 2009 2 commits
    • Mark Olesen's avatar
      HashSet and PackedList get an unset() method · d2d39c32
      Mark Olesen authored
      - provides a convenient (and lazy) means of removing entries
      d2d39c32
    • Mark Olesen's avatar
      Applied Mattijs' PackedList improvements · 16c715ce
      Mark Olesen authored
      - resize with factor 2 as per DynamicList
      
      Old insertion speed:
          1000000 in 0.61 s
          2000000 in 2.24 s
          3000000 in 3.97 s
          4000000 in 5.76 s
          5000000 in 7.54 s
          6000000 in 9.41 s
          7000000 in 11.5 s
      
      New insertion speed:
          1000000 in 0.01 s
          2000000 in 0.02 s
          3000000 in 0.01 s
          4000000 in 0.02 s
          5000000 in 0.01 s
          6000000 in 0.01 s
          7000000 in 0.01 s
      16c715ce
  4. 07 Dec, 2009 1 commit
  5. 02 Dec, 2009 1 commit
  6. 03 Dec, 2009 1 commit
    • Mark Olesen's avatar
      PackedBoolList specializaton for operator= · 063d8ede
      Mark Olesen authored
      - now that I re-examined the code, the note in commit 51fd6327
        can be mostly ignored
      
        PackedList isMaster(nPoints, 1u);
        is not really inefficient at all, since the '1u' is packed into
        32/64-bits before the subsequent assignment and doesn't involve
        shifts/masking for each index
      
        The same misinformation applies to the PackedList(size, 0u) form.
        It isn't much slower at all.
      
        Nonetheless, add bool specialization so that it is a simple assign.
      063d8ede
  7. 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.
      b2d7439b
  8. 23 Nov, 2009 1 commit
  9. 12 Nov, 2009 1 commit
  10. 04 Nov, 2009 1 commit
  11. 03 Nov, 2009 2 commits
  12. 26 Oct, 2009 1 commit
  13. 13 Aug, 2009 1 commit
  14. 10 Aug, 2009 1 commit
  15. 23 Jul, 2009 2 commits
  16. 25 Jun, 2009 1 commit
  17. 23 Jun, 2009 1 commit
  18. 22 Jun, 2009 2 commits
  19. 18 Jun, 2009 1 commit
  20. 18 May, 2009 1 commit
    • Mark Olesen's avatar
      introduce readList<T> function · a0a9cd33
      Mark Olesen authored
      - Read a bracket-delimited list, or handle a single value as list of size 1.
        Mostly useful for handling command-line arguments.
        eg,
            if (args.options().found("patches"))
            {
                patches = readList<word>(IStringStream(args.options()["patches"])());
            }
        can handle both of these:
            -patches  patch0
            -patches \( patch1 patch2 patch3 \)
      a0a9cd33
  21. 27 Apr, 2009 1 commit
    • Mark Olesen's avatar
      consistency update · 48247a3d
      Mark Olesen authored
      - DynamicList gets append methods as per List
      - misc cosmetic changes
      48247a3d
  22. 22 Apr, 2009 1 commit
  23. 21 Apr, 2009 1 commit
  24. 16 Mar, 2009 2 commits
  25. 12 Mar, 2009 3 commits
  26. 10 Mar, 2009 1 commit
  27. 04 Mar, 2009 2 commits
    • Mark Olesen's avatar
      96118536
    • 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).
      17548296
  28. 27 Feb, 2009 4 commits
    • Mark Olesen's avatar
      StaticAssert added · 106d417d
      Mark Olesen authored
      - catch people using silly template sizes for FixedList, PackedList
      106d417d
    • mattijs's avatar
      operator== on result of operator[] behaves weird · 0f7b03e6
      mattijs authored
      0f7b03e6
    • Mark Olesen's avatar
      PackedList iterator bugfix · dbc9b742
      Mark Olesen authored
      - compare iteratorBase == iteratorBase by value, not position
        thus this works
            list[a] == list[b] ...
      
      - compare iterator == iteratorBase and const_iterator == iteratorBase
        by position, not value. The inheritance rules means that this works:
            iter == list.end() ...
        this will compare positions:
            iter == list[5];
        Of course, this will still compare values:
            *iter == list[5];
      dbc9b742
    • 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
        throughout
      576d9388