Chemical Data Processing Library C++ API - Version 1.4.0
Array.hpp
Go to the documentation of this file.
1 /*
2  * Array.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_UTIL_ARRAY_HPP
30 #define CDPL_UTIL_ARRAY_HPP
31 
32 #include <vector>
33 #include <string>
34 #include <cstddef>
35 #include <utility>
36 #include <memory>
37 
38 #include "CDPL/Base/Exceptions.hpp"
39 #include "CDPL/Util/BitSet.hpp"
40 
41 #ifndef CDPL_UTIL_ARRAY_CHECK_INDEX
42 # ifdef CDPL_UTIL_ARRAY_CHECKS_DISABLE
43 # define CDPL_UTIL_ARRAY_CHECK_INDEX(idx, allow_end)
44 # else // !CDPL_UTIL_ARRAY_CHECKS_DISABLE
45 # define CDPL_UTIL_ARRAY_CHECK_INDEX(idx, allow_end) checkIndex(idx, allow_end)
46 # endif // CDPL_UTIL_ARRAY_CHECKS_DISABLE
47 #endif // !CDPL_UTIL_ARRAY_CHECK_INDEX
48 
49 #ifndef CDPL_UTIL_ARRAY_CHECK_ITER
50 # ifdef CDPL_UTIL_ARRAY_CHECKS_DISABLE
51 # define CDPL_UTIL_ARRAY_CHECK_ITER(it, allow_end)
52 # else // !CDPL_UTIL_ARRAY_CHECKS_DISABLE
53 # define CDPL_UTIL_ARRAY_CHECK_ITER(it, allow_end) checkIterator(it, allow_end)
54 # endif // CDPL_UTIL_ARRAY_CHECKS_DISABLE
55 #endif // !CDPL_UTIL_ARRAY_CHECK_INDEX
56 
57 
58 namespace CDPL
59 {
60 
61  namespace Util
62  {
63 
90  template <typename ValueType>
91  class Array
92  {
93 
94  public:
95  typedef std::vector<ValueType> StorageType;
96 
100  typedef std::shared_ptr<Array> SharedPointer;
101 
105  typedef ValueType ElementType;
106 
110  typedef std::size_t SizeType;
111 
119  typedef Array BaseType;
120 
125  typedef typename StorageType::const_iterator ConstElementIterator;
126 
131  typedef typename StorageType::const_reverse_iterator ConstReverseElementIterator;
132 
137  typedef typename StorageType::iterator ElementIterator;
138 
143  typedef typename StorageType::reverse_iterator ReverseElementIterator;
144 
148  Array():
149  data() {}
150 
156  Array(std::size_t num_elem, const ValueType& value = ValueType()):
157  data(num_elem, value) {}
158 
164  template <typename InputIter>
165  Array(const InputIter& first, const InputIter& last):
166  data(first, last)
167  {}
168 
172  virtual ~Array() {}
173 
179 
184  const StorageType& getData() const;
185 
192 
198  const BaseType& getBase() const;
199 
204  std::size_t getSize() const;
205 
210  std::size_t size() const;
211 
216  bool isEmpty() const;
217 
223  void resize(std::size_t num_elem, const ValueType& value = ValueType());
224 
236  void reserve(std::size_t num_elem);
237 
246  std::size_t getCapacity() const;
247 
251  void clear();
252 
257  void swap(Array& array);
258 
268  void assign(std::size_t num_elem, const ValueType& value = ValueType());
269 
280  template <typename InputIter>
281  void assign(const InputIter& first, const InputIter& last);
282 
287  void addElement(const ValueType& value = ValueType());
288 
295  void insertElement(std::size_t idx, const ValueType& value = ValueType());
296 
303  ElementIterator insertElement(const ElementIterator& it, const ValueType& value = ValueType());
304 
312  void insertElements(std::size_t idx, std::size_t num_elem, const ValueType& value = ValueType());
313 
321  void insertElements(const ElementIterator& it, std::size_t num_elem, const ValueType& value = ValueType());
322 
330  template <typename InputIter>
331  void insertElements(std::size_t idx, const InputIter& first, const InputIter& last);
332 
341  template <typename InputIter>
342  void insertElements(const ElementIterator& it, const InputIter& first, const InputIter& last);
343 
349 
355  void removeElement(std::size_t idx);
356 
365 
376 
382  const ValueType& getFirstElement() const;
383 
389  const ValueType& getLastElement() const;
390 
396  ValueType& getFirstElement();
397 
403  ValueType& getLastElement();
404 
410 
416 
422 
428 
434 
440 
446 
452 
458 
464 
470 
476 
486  const ValueType& getElement(std::size_t idx) const;
487 
497  ValueType& getElement(std::size_t idx);
498 
505  void setElement(std::size_t idx, const ValueType& value = ValueType());
506 
513  const ValueType& operator[](std::size_t idx) const;
514 
521  ValueType& operator[](std::size_t idx);
522 
523  protected:
524  void checkIfNonEmpty() const;
525  void checkIndex(std::size_t idx, bool allow_end) const;
526  void checkIterator(const ElementIterator& it, bool allow_end);
527  void checkIterator(const ConstElementIterator& it, bool allow_end) const;
528 
556  virtual const char* getClassName() const;
557 
558  private:
559  void throwIndexError() const;
560  void throwRangeError() const;
561  void throwOperationFailed() const;
562 
563  StorageType data;
564  };
565 
566 
571 
576 
581 
585  typedef std::pair<std::size_t, std::size_t> STPair;
586 
591 
596 
601 
606 
615  template <typename ValueType>
616  bool operator==(const Array<ValueType>& array1, const Array<ValueType>& array2);
617 
626  template <typename ValueType>
627  bool operator!=(const Array<ValueType>& array1, const Array<ValueType>& array2);
628 
637  template <typename ValueType>
638  bool operator<=(const Array<ValueType>& array1, const Array<ValueType>& array2);
639 
648  template <typename ValueType>
649  bool operator>=(const Array<ValueType>& array1, const Array<ValueType>& array2);
650 
659  template <typename ValueType>
660  bool operator<(const Array<ValueType>& array1, const Array<ValueType>& array2);
661 
670  template <typename ValueType>
671  bool operator>(const Array<ValueType>& array1, const Array<ValueType>& array2);
672 
673  } // namespace Util
674 } // namespace CDPL
675 
676 
677 // Implementation
678 
679 template <typename ValueType>
681 {
682  return data;
683 }
684 
685 template <typename ValueType>
687 {
688  return data;
689 }
690 
691 template <typename ValueType>
693 {
694  return *this;
695 }
696 
697 template <typename ValueType>
699 {
700  return *this;
701 }
702 
703 template <typename ValueType>
705 {
706  return data.size();
707 }
708 
709 template <typename ValueType>
711 {
712  return data.size();
713 }
714 
715 template <typename ValueType>
717 {
718  return data.empty();
719 }
720 
721 template <typename ValueType>
722 void CDPL::Util::Array<ValueType>::resize(std::size_t n, const ValueType& value)
723 {
724  data.resize(n, value);
725 }
726 
727 template <typename ValueType>
729 {
730  return data.capacity();
731 }
732 
733 template <typename ValueType>
734 void CDPL::Util::Array<ValueType>::reserve(std::size_t min_size)
735 {
736  data.reserve(min_size);
737 }
738 
739 template <typename ValueType>
741 {
742  data.clear();
743 }
744 
745 template <typename ValueType>
747 {
748  data.swap(array.data);
749 }
750 
751 template <typename ValueType>
752 void CDPL::Util::Array<ValueType>::assign(std::size_t n, const ValueType& value)
753 {
754  data.assign(n, value);
755 }
756 
757 template <typename ValueType>
758 template <typename InputIter>
759 void CDPL::Util::Array<ValueType>::assign(const InputIter& first, const InputIter& last)
760 {
761  data.assign(first, last);
762 }
763 
764 template <typename ValueType>
765 void CDPL::Util::Array<ValueType>::addElement(const ValueType& value)
766 {
767  data.push_back(value);
768 }
769 
770 template <typename ValueType>
771 void CDPL::Util::Array<ValueType>::insertElement(std::size_t idx, const ValueType& value)
772 {
773  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, true);
774 
775  data.insert(data.begin() + idx, value);
776 }
777 
778 template <typename ValueType>
780  const ValueType& value)
781 {
782  CDPL_UTIL_ARRAY_CHECK_ITER(it, true);
783 
784  return data.insert(it, value);
785 }
786 
787 template <typename ValueType>
788 void CDPL::Util::Array<ValueType>::insertElements(std::size_t idx, std::size_t n, const ValueType& value)
789 {
790  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, true);
791 
792  data.insert(data.begin() + idx, n, value);
793 }
794 
795 template <typename ValueType>
796 void CDPL::Util::Array<ValueType>::insertElements(const ElementIterator& it, std::size_t n, const ValueType& value)
797 {
798  CDPL_UTIL_ARRAY_CHECK_ITER(it, true);
799 
800  data.insert(it, n, value);
801 }
802 
803 template <typename ValueType>
804 template <typename InputIter>
805 void CDPL::Util::Array<ValueType>::insertElements(std::size_t idx, const InputIter& first, const InputIter& last)
806 {
807  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, true);
808 
809  data.insert(data.begin() + idx, first, last);
810 }
811 
812 template <typename ValueType>
813 template <typename InputIter>
814 void CDPL::Util::Array<ValueType>::insertElements(const ElementIterator& it, const InputIter& first, const InputIter& last)
815 {
816  CDPL_UTIL_ARRAY_CHECK_ITER(it, true);
817 
818  data.insert(it, first, last);
819 }
820 
821 template <typename ValueType>
823 {
824  if (data.empty())
825  throw Base::OperationFailed("Array: attempt to pop element from an empty array");
826 
827  data.pop_back();
828 }
829 
830 template <typename ValueType>
832 {
833  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
834 
835  data.erase(data.begin() + idx);
836 }
837 
838 template <typename ValueType>
840 {
841  CDPL_UTIL_ARRAY_CHECK_ITER(it, false);
842 
843  return data.erase(it);
844 }
845 
846 template <typename ValueType>
848  const ElementIterator& last)
849 {
850  CDPL_UTIL_ARRAY_CHECK_ITER(first, true);
851  CDPL_UTIL_ARRAY_CHECK_ITER(last, true);
852 
853  if (first > last)
854  throw Base::RangeError(std::string(getClassName()) + ": invalid iterator range: first > last");
855 
856  return data.erase(first, last);
857 }
858 
859 template <typename ValueType>
861 {
862  checkIfNonEmpty();
863 
864  return data.front();
865 }
866 
867 template <typename ValueType>
869 {
870  checkIfNonEmpty();
871 
872  return data.back();
873 }
874 
875 template <typename ValueType>
877 {
878  checkIfNonEmpty();
879 
880  return data.front();
881 }
882 
883 template <typename ValueType>
885 {
886  checkIfNonEmpty();
887 
888  return data.back();
889 }
890 
891 template <typename ValueType>
893 {
894  return data.begin();
895 }
896 
897 template <typename ValueType>
899 {
900  return data.begin();
901 }
902 
903 template <typename ValueType>
905 {
906  return data.end();
907 }
908 
909 template <typename ValueType>
911 {
912  return data.end();
913 }
914 
915 template <typename ValueType>
917 {
918  return data.begin();
919 }
920 
921 template <typename ValueType>
923 {
924  return data.begin();
925 }
926 
927 template <typename ValueType>
929 {
930  return data.end();
931 }
932 
933 template <typename ValueType>
935 {
936  return data.end();
937 }
938 
939 template <typename ValueType>
941 {
942  return data.rbegin();
943 }
944 
945 template <typename ValueType>
947 {
948  return data.rbegin();
949 }
950 
951 template <typename ValueType>
953 {
954  return data.rend();
955 }
956 
957 template <typename ValueType>
959 {
960  return data.rend();
961 }
962 
963 template <typename ValueType>
964 const ValueType& CDPL::Util::Array<ValueType>::getElement(std::size_t idx) const
965 {
966  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
967 
968  return data[idx];
969 }
970 
971 template <typename ValueType>
972 ValueType& CDPL::Util::Array<ValueType>::getElement(std::size_t idx)
973 {
974  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
975 
976  return data[idx];
977 }
978 
979 template <typename ValueType>
980 void CDPL::Util::Array<ValueType>::setElement(std::size_t idx, const ValueType& value)
981 {
982  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
983 
984  data[idx] = value;
985 }
986 
987 template <typename ValueType>
988 const ValueType& CDPL::Util::Array<ValueType>::operator[](std::size_t idx) const
989 {
990  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
991 
992  return data[idx];
993 }
994 
995 template <typename ValueType>
996 ValueType& CDPL::Util::Array<ValueType>::operator[](std::size_t idx)
997 {
998  CDPL_UTIL_ARRAY_CHECK_INDEX(idx, false);
999 
1000  return data[idx];
1001 }
1002 
1003 template <typename ValueType>
1005 {
1006  if (data.empty())
1007  throwOperationFailed();
1008 }
1009 
1010 template <typename ValueType>
1011 void CDPL::Util::Array<ValueType>::checkIndex(std::size_t idx, bool allow_end) const
1012 {
1013  if ((allow_end && idx > data.size()) || (!allow_end && idx >= data.size()))
1014  throwIndexError();
1015 }
1016 
1017 template <typename ValueType>
1019 {
1020  if (it < data.begin() || (allow_end && it > data.end()) || (!allow_end && it >= data.end()))
1021  throwRangeError();
1022 }
1023 
1024 template <typename ValueType>
1026 {
1027  if (it < data.begin() || (allow_end && it > data.end()) || (!allow_end && it >= data.end()))
1028  throwRangeError();
1029 }
1030 
1031 template <typename ValueType>
1033 {
1034  throw Base::IndexError(std::string(getClassName()) + ": element index out of bounds");
1035 }
1036 
1037 template <typename ValueType>
1039 {
1040  throw Base::RangeError(std::string(getClassName()) + ": invalid iterator");
1041 }
1042 
1043 template <typename ValueType>
1045 {
1046  throw Base::OperationFailed(std::string(getClassName()) + ": operation requires non-empty array");
1047 }
1048 
1049 template <typename ValueType>
1051 {
1052  return "Array";
1053 }
1054 
1055 // \cond DOC_IMPL_DETAILS
1056 
1057 template <typename ValueType>
1058 bool CDPL::Util::operator==(const Array<ValueType>& array1, const Array<ValueType>& array2)
1059 {
1060  return (array1.getData() == array2.getData());
1061 }
1062 
1063 template <typename ValueType>
1064 bool CDPL::Util::operator!=(const Array<ValueType>& array1, const Array<ValueType>& array2)
1065 {
1066  return (array1.getData() != array2.getData());
1067 }
1068 
1069 template <typename ValueType>
1070 bool CDPL::Util::operator<=(const Array<ValueType>& array1, const Array<ValueType>& array2)
1071 {
1072  return (array1.getData() <= array2.getData());
1073 }
1074 
1075 template <typename ValueType>
1076 bool CDPL::Util::operator>=(const Array<ValueType>& array1, const Array<ValueType>& array2)
1077 {
1078  return (array1.getData() >= array2.getData());
1079 }
1080 
1081 template <typename ValueType>
1082 bool CDPL::Util::operator<(const Array<ValueType>& array1, const Array<ValueType>& array2)
1083 {
1084  return (array1.getData() < array2.getData());
1085 }
1086 
1087 template <typename ValueType>
1088 bool CDPL::Util::operator>(const Array<ValueType>& array1, const Array<ValueType>& array2)
1089 {
1090  return (array1.getData() > array2.getData());
1091 }
1092 
1093 // \endcond
1094 
1095 #endif // CDPL_UTIL_ARRAY_HPP
#define CDPL_UTIL_ARRAY_CHECK_ITER(it, allow_end)
Definition: Array.hpp:53
#define CDPL_UTIL_ARRAY_CHECK_INDEX(idx, allow_end)
Definition: Array.hpp:45
Definition of exception classes.
Declaration of type CDPL::Util::BitSet.
Thrown to indicate that an index is out of range.
Definition: Base/Exceptions.hpp:152
Thrown to indicate that some requested operation has failed (e.g. due to unfulfilled preconditions or...
Definition: Base/Exceptions.hpp:211
Thrown to indicate that a value is out of range.
Definition: Base/Exceptions.hpp:114
Dynamic array class providing amortized constant time access to arbitrary elements.
Definition: Array.hpp:92
Array(std::size_t num_elem, const ValueType &value=ValueType())
Creates and initializes the array with num_elem copies of value.
Definition: Array.hpp:156
ValueType ElementType
The type of objects stored by the array.
Definition: Array.hpp:105
std::size_t size() const
Returns the number of elements stored in the array.
Definition: Array.hpp:710
void clear()
Erases all elements.
Definition: Array.hpp:740
virtual const char * getClassName() const
Returns the name of the (derived) array class.
Definition: Array.hpp:1050
StorageType::const_iterator ConstElementIterator
A constant random access iterator used to iterate over the elements of the array.
Definition: Array.hpp:125
StorageType::const_reverse_iterator ConstReverseElementIterator
A constant random access iterator used to iterate over the elements of the array in reverse order.
Definition: Array.hpp:131
StorageType::reverse_iterator ReverseElementIterator
A mutable random access iterator used to iterate over the elements of the array in reverse order.
Definition: Array.hpp:143
void reserve(std::size_t num_elem)
Preallocates memory for (at least) num_elem elements.
Definition: Array.hpp:734
ReverseElementIterator getElementsReverseBegin()
Returns a mutable iterator pointing to the beginning of the reversed array.
Definition: Array.hpp:946
Array(const InputIter &first, const InputIter &last)
Creates and initializes the array with copies of the elements in the range [first,...
Definition: Array.hpp:165
ElementIterator end()
Returns a mutable iterator pointing to the end of the array.
Definition: Array.hpp:934
ConstElementIterator getElementsEnd() const
Returns a constant iterator pointing to the end of the array.
Definition: Array.hpp:904
void checkIndex(std::size_t idx, bool allow_end) const
Definition: Array.hpp:1011
void checkIterator(const ConstElementIterator &it, bool allow_end) const
Definition: Array.hpp:1025
std::size_t getCapacity() const
Returns the number of elements for which memory has been allocated.
Definition: Array.hpp:728
BaseType & getBase()
Returns a non-const reference to itself.
Definition: Array.hpp:692
ConstElementIterator begin() const
Returns a constant iterator pointing to the beginning of the array.
Definition: Array.hpp:916
ConstReverseElementIterator getElementsReverseBegin() const
Returns a constant iterator pointing to the beginning of the reversed array.
Definition: Array.hpp:940
std::vector< ValueType > StorageType
Definition: Array.hpp:95
const StorageType & getData() const
Returns a const reference to the underlying array storage.
Definition: Array.hpp:686
ElementIterator begin()
Returns a mutable iterator pointing to the beginning of the array.
Definition: Array.hpp:922
void checkIterator(const ElementIterator &it, bool allow_end)
Definition: Array.hpp:1018
StorageType::iterator ElementIterator
A mutable random access iterator used to iterate over the elements of the array.
Definition: Array.hpp:137
void assign(std::size_t num_elem, const ValueType &value=ValueType())
This function fills the array with num_elem copies of the given value.
Definition: Array.hpp:752
void checkIfNonEmpty() const
Definition: Array.hpp:1004
ValueType & operator[](std::size_t idx)
Returns a non-const reference to the element at index idx.
Definition: Array.hpp:996
void removeElement(std::size_t idx)
Removes the element at the position specified by the index idx.
Definition: Array.hpp:831
Array BaseType
Specifies for derived classes the type of the Array base class.
Definition: Array.hpp:119
virtual ~Array()
Virtual destructor.
Definition: Array.hpp:172
ConstElementIterator getElementsBegin() const
Returns a constant iterator pointing to the beginning of the array.
Definition: Array.hpp:892
ConstElementIterator end() const
Returns a constant iterator pointing to the end of the array.
Definition: Array.hpp:928
ValueType & getElement(std::size_t idx)
Returns a non-const reference to the element at index idx.
Definition: Array.hpp:972
const BaseType & getBase() const
Returns a const reference to itself.
Definition: Array.hpp:698
const ValueType & operator[](std::size_t idx) const
Returns a const reference to the element at index idx.
Definition: Array.hpp:988
std::size_t SizeType
The type of objects stored by the array.
Definition: Array.hpp:110
bool isEmpty() const
Tells whether the array is empty (getSize() == 0).
Definition: Array.hpp:716
void insertElement(std::size_t idx, const ValueType &value=ValueType())
Inserts a new element before the location specified by the index idx.
Definition: Array.hpp:771
void popLastElement()
Removes the last element of the array.
Definition: Array.hpp:822
const ValueType & getLastElement() const
Returns a const reference to the last element of the array.
Definition: Array.hpp:868
void setElement(std::size_t idx, const ValueType &value=ValueType())
Assigns a new value to the element specified by the index idx.
Definition: Array.hpp:980
void insertElements(std::size_t idx, std::size_t num_elem, const ValueType &value=ValueType())
Inserts num_elem copies of value before the location specified by the index idx.
Definition: Array.hpp:788
ElementIterator removeElements(const ElementIterator &first, const ElementIterator &last)
Removes the elements pointed to by the iterators in the range [first, last).
Definition: Array.hpp:847
Array()
Creates an empty array.
Definition: Array.hpp:148
std::size_t getSize() const
Returns the number of elements stored in the array.
Definition: Array.hpp:704
void assign(const InputIter &first, const InputIter &last)
This function fills a vector with copies of the elements in the range [first, last).
Definition: Array.hpp:759
const ValueType & getElement(std::size_t idx) const
Returns a const reference to the element at index idx.
Definition: Array.hpp:964
ElementIterator getElementsEnd()
Returns a mutable iterator pointing to the end of the array.
Definition: Array.hpp:910
void resize(std::size_t num_elem, const ValueType &value=ValueType())
Inserts or erases elements at the end so that the size becomes num_elem.
Definition: Array.hpp:722
ConstReverseElementIterator getElementsReverseEnd() const
Returns a constant iterator pointing to the end of the reversed array.
Definition: Array.hpp:952
ValueType & getFirstElement()
Returns a non-const reference to the first element of the array.
Definition: Array.hpp:876
std::shared_ptr< Array > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Array instances.
Definition: Array.hpp:100
ValueType & getLastElement()
Returns a non-const reference to the last element of the array.
Definition: Array.hpp:884
ReverseElementIterator getElementsReverseEnd()
Returns a mutable iterator pointing to the end of the reversed array.
Definition: Array.hpp:958
StorageType & getData()
Returns a non-const reference to the underlying array storage.
Definition: Array.hpp:680
const ValueType & getFirstElement() const
Returns a const reference to the first element of the array.
Definition: Array.hpp:860
void addElement(const ValueType &value=ValueType())
Inserts a new element at the end of the array.
Definition: Array.hpp:765
void swap(Array &array)
Swaps the contents with array.
Definition: Array.hpp:746
ElementIterator getElementsBegin()
Returns a mutable iterator pointing to the beginning of the array.
Definition: Array.hpp:898
boost::transform_iterator< DerefFunc, typename BaseType::ElementIterator, ValueType & > ElementIterator
A mutable random access iterator used to iterate over the pointed-to objects.
Definition: IndirectArray.hpp:114
Array< double > DArray
Array storing floating point values of type double.
Definition: Array.hpp:595
Array< std::size_t > STArray
Array storing unsigned integers of type std::size_t.
Definition: Array.hpp:575
Array< long > LArray
Array storing integers of type long.
Definition: Array.hpp:580
bool operator<(const Array< ValueType > &array1, const Array< ValueType > &array2)
Less than comparison operator.
Array< unsigned int > UIArray
Array storing unsigned integers of type unsigned int.
Definition: Array.hpp:570
bool operator>=(const Array< ValueType > &array1, const Array< ValueType > &array2)
Greater or equal comparison operator.
Array< BitSet > BitSetArray
Array storing Util::BitSet objects.
Definition: Array.hpp:605
bool operator>(const Array< ValueType > &array1, const Array< ValueType > &array2)
Greater than comparison operator.
Array< STPair > STPairArray
Array storing pairs of unsigned integers of type std::size_t.
Definition: Array.hpp:590
Array< std::string > SArray
Array storing std::string objects.
Definition: Array.hpp:600
bool operator!=(const Array< ValueType > &array1, const Array< ValueType > &array2)
Inequality comparison operator.
std::pair< std::size_t, std::size_t > STPair
Pair of unsigned integers of type std::size_t.
Definition: Array.hpp:585
bool operator<=(const Array< ValueType > &array1, const Array< ValueType > &array2)
Less or equal comparison operator.
bool operator==(const Array< ValueType > &array1, const Array< ValueType > &array2)
Equality comparison operator.
The namespace of the Chemical Data Processing Library.