Factor: use the default copy constructor
This commit is contained in:
parent
389daab83f
commit
e2ca97c8de
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user