Factor: use the default copy constructor

This commit is contained in:
Tiago Gomes 2013-03-21 21:20:28 +00:00
parent 389daab83f
commit e2ca97c8de
2 changed files with 1 additions and 25 deletions

View File

@ -11,13 +11,6 @@
namespace Horus {
Factor::Factor (const Factor& g)
{
clone (g);
}
Factor::Factor (
const VarIds& vids,
const Ranges& ranges,
@ -102,7 +95,7 @@ void
Factor::multiply (Factor& g)
{
if (args_.empty()) {
clone (g);
*this = g;
} else {
GenericFactor<VarId>::multiply (g);
}
@ -228,16 +221,5 @@ Factor::sumOutArgs (const std::vector<bool>& mask)
params_ = newps;
}
void
Factor::clone (const Factor& g)
{
args_ = g.arguments();
ranges_ = g.ranges();
params_ = g.params();
distId_ = g.distId();
}
} // namespace Horus

View File

@ -16,8 +16,6 @@ class Factor : public GenericFactor<VarId> {
public:
Factor() { }
Factor (const Factor&);
Factor (const VarIds&, const Ranges&, const Params&,
unsigned = Util::maxUnsigned());
@ -44,10 +42,6 @@ class Factor : public GenericFactor<VarId> {
void sumOutLastVariable();
void sumOutArgs (const std::vector<bool>& mask);
void clone (const Factor& f);
DISALLOW_ASSIGN (Factor);
};
} // namespace Horus