Add a source file for Indexer class
- Move some non-performance critical methods to the source file - Fix some implicit declarions of members in iomanip - Fix declaration order in Makefile.in
This commit is contained in:
32
packages/CLPBN/horus/Indexer.cpp
Normal file
32
packages/CLPBN/horus/Indexer.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "Indexer.h"
|
||||
|
||||
|
||||
namespace Horus {
|
||||
|
||||
std::ostream&
|
||||
operator<< (std::ostream& os, const Indexer& indexer)
|
||||
{
|
||||
os << "(" ;
|
||||
os << std::setw (2) << std::setfill('0') << indexer.index_;
|
||||
os << ") " ;
|
||||
os << indexer.indices_;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::ostream&
|
||||
operator<< (std::ostream &os, const MapIndexer& indexer)
|
||||
{
|
||||
os << "(" ;
|
||||
os << std::setw (2) << std::setfill('0') << indexer.index_;
|
||||
os << ") " ;
|
||||
os << indexer.indices_;
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Horus
|
||||
|
Reference in New Issue
Block a user