14 #ifndef INCLUDED_protocols_genetic_algorithm_Entity_hh
15 #define INCLUDED_protocols_genetic_algorithm_Entity_hh
24 #include <utility/vector1.hh>
25 #include <utility/factory/WidgetFactory.hh>
26 #include <utility/factory/WidgetRegistrator.hh>
27 #include <utility/pointer/ReferenceCount.hh>
28 #include <utility/pointer/owning_ptr.hh>
29 #include <utility/pointer/access_ptr.hh>
32 #include <boost/functional/hash.hpp>
42 namespace genetic_algorithm {
107 typedef typename utility::factory::WidgetRegistrator< EntityElementFactory, T >
parent;
146 virtual void show( std::ostream & os )
const;
161 template <
typename T>
167 if ( !a && !b )
return false;
168 if ( !a )
return true;
169 if ( !b )
return false;
174 template <
typename T>
180 if ( !a && !b )
return true;
181 if ( !a || !b )
return false;
188 std::size_t seed = 0;
189 for ( EntityElements::const_iterator
190 iter = vec1.begin(), iter_end = vec1.end(); iter != iter_end; ++iter ) {
191 boost::hash_combine( seed, (*iter)->hash() );
203 if ( elems1.size() != elems2.size() )
return false;
204 for (
core::Size ii = 1; ii <= elems1.size(); ++ii ) {
205 if ( ! ((*elems1[ ii ]) == (*elems2[ ii ])) )
return false;