User Profile

Collapse

Profile Sidebar

Collapse
barabenka
barabenka
Last Activity: Jun 26 '07, 07:29 PM
Joined: Jun 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • barabenka
    started a topic dynamicly defined number of loops?
    in C

    dynamicly defined number of loops?

    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...
    See more | Go to post

  • barabenka
    replied to find_if with vector of data structures
    in C
    Yes it will work, thank you indeed....
    See more | Go to post

    Leave a comment:


  • barabenka
    replied to find_if with vector of data structures
    in C
    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......
    See more | Go to post

    Leave a comment:


  • barabenka
    replied to find_if with vector of data structures
    in C
    I would like to find record based on given id, so Record.ID==Give nID....
    See more | Go to post

    Leave a comment:


  • barabenka
    started a topic find_if with vector of data structures
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...