Factor: use the default copy constructor
This commit is contained in:
parent
389daab83f
commit
e2ca97c8de
@ -11,13 +11,6 @@
|
|||||||
|
|
||||||
namespace Horus {
|
namespace Horus {
|
||||||
|
|
||||||
Factor::Factor (const Factor& g)
|
|
||||||
{
|
|
||||||
clone (g);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Factor::Factor (
|
Factor::Factor (
|
||||||
const VarIds& vids,
|
const VarIds& vids,
|
||||||
const Ranges& ranges,
|
const Ranges& ranges,
|
||||||
@ -102,7 +95,7 @@ void
|
|||||||
Factor::multiply (Factor& g)
|
Factor::multiply (Factor& g)
|
||||||
{
|
{
|
||||||
if (args_.empty()) {
|
if (args_.empty()) {
|
||||||
clone (g);
|
*this = g;
|
||||||
} else {
|
} else {
|
||||||
GenericFactor<VarId>::multiply (g);
|
GenericFactor<VarId>::multiply (g);
|
||||||
}
|
}
|
||||||
@ -228,16 +221,5 @@ Factor::sumOutArgs (const std::vector<bool>& mask)
|
|||||||
params_ = newps;
|
params_ = newps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
Factor::clone (const Factor& g)
|
|
||||||
{
|
|
||||||
args_ = g.arguments();
|
|
||||||
ranges_ = g.ranges();
|
|
||||||
params_ = g.params();
|
|
||||||
distId_ = g.distId();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Horus
|
} // namespace Horus
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@ class Factor : public GenericFactor<VarId> {
|
|||||||
public:
|
public:
|
||||||
Factor() { }
|
Factor() { }
|
||||||
|
|
||||||
Factor (const Factor&);
|
|
||||||
|
|
||||||
Factor (const VarIds&, const Ranges&, const Params&,
|
Factor (const VarIds&, const Ranges&, const Params&,
|
||||||
unsigned = Util::maxUnsigned());
|
unsigned = Util::maxUnsigned());
|
||||||
|
|
||||||
@ -44,10 +42,6 @@ class Factor : public GenericFactor<VarId> {
|
|||||||
void sumOutLastVariable();
|
void sumOutLastVariable();
|
||||||
|
|
||||||
void sumOutArgs (const std::vector<bool>& mask);
|
void sumOutArgs (const std::vector<bool>& mask);
|
||||||
|
|
||||||
void clone (const Factor& f);
|
|
||||||
|
|
||||||
DISALLOW_ASSIGN (Factor);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Horus
|
} // namespace Horus
|
||||||
|
Reference in New Issue
Block a user