|
template<typename Key , typename Val > |
void | create () |
|
template<typename Key , typename Val > |
void | insert () |
|
template<typename Key , typename Val > |
void | emplace () |
|
template<typename Key , typename Val > |
void | iterate (const Val &default_value=0) |
|
Definition at line 11 of file vectormap_test.C.
◆ CPPUNIT_TEST() [1/5]
◆ CPPUNIT_TEST() [2/5]
◆ CPPUNIT_TEST() [3/5]
◆ CPPUNIT_TEST() [4/5]
◆ CPPUNIT_TEST() [5/5]
VectormapTest::CPPUNIT_TEST |
( |
testFind |
| ) |
|
◆ CPPUNIT_TEST_SUITE_END()
VectormapTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ create()
template<typename Key , typename Val >
void VectormapTest::create |
( |
| ) |
|
|
inlineprivate |
Definition at line 27 of file vectormap_test.C.
This vectormap templated class is intended to provide the performance characteristics of a sorted s...
◆ emplace()
template<typename Key , typename Val >
void VectormapTest::emplace |
( |
| ) |
|
|
inlineprivate |
◆ insert()
template<typename Key , typename Val >
void VectormapTest::insert |
( |
| ) |
|
|
inlineprivate |
◆ iterate()
template<typename Key , typename Val >
void VectormapTest::iterate |
( |
const Val & |
default_value = 0 | ) |
|
|
inlineprivate |
Definition at line 59 of file vectormap_test.C.
References libMesh::vectormap< Key, Tp >::count(), libMesh::vectormap< Key, Tp >::insert(), and libMesh::vectormap< Key, Tp >::sort().
63 Val val(default_value);
65 for (Key key=1; key<32; key*=2)
66 vm.
insert (std::make_pair(key,val));
73 const Key &ikey = it->first;
74 const Val &ival = it->second;
76 CPPUNIT_ASSERT ( vm.
count(ikey) == 1 );
77 CPPUNIT_ASSERT_EQUAL (vm[ikey], ival);
78 CPPUNIT_ASSERT_EQUAL (ival, val);
vector_type::const_iterator const_iterator
void sort()
Sort & unique the vectormap, preparing for use.
void insert(const value_type &x)
Inserts x into the vectormap.
difference_type count(const key_type &key) const
This vectormap templated class is intended to provide the performance characteristics of a sorted s...
◆ LIBMESH_CPPUNIT_TEST_SUITE()
◆ testCreate()
void VectormapTest::testCreate |
( |
| ) |
|
|
inline |
◆ testEmplace()
void VectormapTest::testEmplace |
( |
| ) |
|
|
inline |
Definition at line 111 of file vectormap_test.C.
115 emplace<int, int> ();
116 emplace<char,int> ();
117 emplace<long,int*>();
118 emplace<int, std::vector<int>>();
◆ testFind()
void VectormapTest::testFind |
( |
| ) |
|
|
inline |
◆ testInsert()
void VectormapTest::testInsert |
( |
| ) |
|
|
inline |
◆ testIterate()
void VectormapTest::testIterate |
( |
| ) |
|
|
inline |
Definition at line 121 of file vectormap_test.C.
125 iterate<int, int> ();
126 iterate<char,int> ();
127 iterate<long,int*>();
128 iterate<int, std::string>(
"test_string");
The documentation for this class was generated from the following file: