I want to program general class for function nodes of factor graph….
Functions (I define them separately) can have different number of variables, for example f_A(x1,x2), f_B(x1, x2, x3)… Each variable may take different number of values, let say N1 for x1, N2 for x2….
In the program I need to build a table of all possible values of a function.
If I knew the number of variables taken by function I would...
User Profile
Collapse
-
dynamicly defined number of loops?
-
Yes it will work, thank you indeed.... -
Thank you a lot.
Interesting... it will require to scan the half of the vector (in average) to get the solution. Will find_if work faster than this?
I guess the fastest way would be to create map ID-> element number in the vector......Leave a comment:
-
I would like to find record based on given id, so Record.ID==Give nID....Leave a comment:
-
find_if with vector of data structures
How can I use find_if with vector of data structures?
I have something like this:
struct Record{
int ID;
int Data1;
int Data2;
};
vector<Record> MyRecords;
I would like to find a record based on ID. Should I use find_if and how can I do it? I know how to use find_if with simple data types but do not know how to write function that checks...
No activity results to display
Show More
Leave a comment: