-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSumMessage.cpp
29 lines (29 loc) · 1.06 KB
/
SumMessage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//#include "SumMessage.h"
//#include "ProdMessage.h"
//#include "Variable.h"
//
//void SumMessage::Generate(ProdMessage* pMsg)
//{
// //the output variables of the input message must be a subset of OutV, EXCEPT sumdOut which is not in OutV. Check this.
//
// //generate one product node for each assignment to the OutV variables
// int Nperm = m_perm.NumberOfPermutations();
//
// //setup one node per each assignment of the output variables
// m_nodes = new SumNode* [Nperm];
// for(int i =0; i<Nperm; i++)
// {
// m_perm.Ind2perm(i);
// std::vector<int> outPerm = m_perm.GetSupersetVals();
// Node node = m_nodes[i];
//
// //attach to that node children for every value of the summed out var
// for (int s=0; i<m_SumdV.m_Nstates; i++) // for every value of the summed out var...
// {
// m_perm.SetSVal(s);
// std::vector<int> inPerm = m_perm.GetSubsetValsPlusS();
// ProdNode pnode = pMsg->GetNode(inPerm);
// node.AddChild(pnode);
// }
// }
//}