Search:

Type: Posts; User: user_name_void

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Yea I did tried google. They mostly have theory...

    Yea I did tried google. They mostly have theory on LFGs. If you were able to find some code, then do share.
  2. Looking for source code of Lagged Fibonacci generator

    Does anyone know where I can find the source code of such a generator?

    Thanks.
  3. I'm having a little with using the struct. I've...

    I'm having a little with using the struct. I've got this so far:



    struct thread_args
    {
    char *filename;
    int count;
    };
  4. help with pthread and multiple arguments

    All tutorials I've seen, only show examples of passing one argument when using pthread_create(). But I want to call one function concurrently by creating multiple threads. I have to pass things such...
  5. Replies
    14
    Views
    1,414

    pathY is -1209735804 and pathX is now...

    pathY is -1209735804 and pathX is now -1209794033.

    At line 337, it has:
    pathX = targetX; pathY = targetY;
    where targetX is 4 and targetY is 3. However, it seems this assignment never gets done,...
  6. Replies
    14
    Views
    1,414

    Okay, I have changed line 165 to: if (a > 0...

    Okay, I have changed line 165 to:


    if (a > 0 && b > 0 && a <= grid.map_xy && b <= grid.map_xy)

    so that if a and b are out of bounds, then it should not use those values. It no longer seg...
  7. Replies
    14
    Views
    1,414

    quzah, please elaborate. 'k' is only used in...

    quzah, please elaborate. 'k' is only used in main() as is incremented.
  8. Replies
    14
    Views
    1,414

    I see that the values of a or b are greater than...

    I see that the values of a or b are greater than 100+ when the program crashes (line 252; the array is usually smaller than this). The values are not suppose to exceed the array size. I am unable to...
  9. Replies
    14
    Views
    1,414

    rags_to_riches, thank you for that quick...

    rags_to_riches, thank you for that quick tutorial. I was able to get some meaningful output, much better than I posted previously.
    After running run:


    Program received signal SIGSEGV,...
  10. Replies
    14
    Views
    1,414

    I get this when it seg faults. But it really...

    I get this when it seg faults. But it really doesnt help me:
  11. Replies
    14
    Views
    1,414

    My program seg faults

    Hey all,

    I am having some segmentation issues. Basically main() reads in a text file, and stores the necessary information in a 2d array. It reads and passes the necessary information to...
  12. Replies
    11
    Views
    1,238

    The while() loop does not modify the x1 and y1...

    The while() loop does not modify the x1 and y1 variables which it receives from either grid() or routing(). It only expands the x1 y1 node and passes the expanded nodes as a 2d array to routing()....
  13. Replies
    11
    Views
    1,238

    Well, I know the if() condition is met because...

    Well, I know the if() condition is met because printf("Goal met!") gets executed. Here is some more code that may help pin point the problem.

    C pastebin - collaborative debugging tool
  14. Replies
    11
    Views
    1,238

    Sorry that link is broken. Here is the new one:...

    Sorry that link is broken. Here is the new one:
    C pastebin - collaborative debugging tool


    EDIT: Should I post the other functions that call movement() and those which movement() call?
  15. Replies
    11
    Views
    1,238

    Oh, my apologies. Here is the loop as well as the...

    Oh, my apologies. Here is the loop as well as the necessary functions:
    http://pastebin.com/d2dd31275

    Line 19 is the line in question. Basically this is pathfinder algorithm and movement()...
  16. Replies
    11
    Views
    1,238

    My loop wont break

    Here is what I have:

    if(x1==x2 && y1==y2) {printf("Goal met!\n"); break;}
    Here is where the loop is suppose to break, but it never does so. Even when x1 and x2 and y1 and y2 have the same values....
  17. Replies
    9
    Views
    5,699

    Okay okay, I've gotten to 2d arrays :shame: ...

    Okay okay, I've gotten to 2d arrays :shame:

    This is Open/Closed list (set) I am referring to:
    Implementation notes
  18. Replies
    2
    Views
    1,078

    doh! I should have seen that. Thanks so much. :)...

    doh! I should have seen that. Thanks so much. :)

    Thanks laserlight, but I had to do this one using two for() loops.
  19. Replies
    2
    Views
    1,078

    My array initialization does not work

    Hi,

    I first set all elements to zero:


    for( k = 0; k < asize; k++)
    for( j = 0; j < asize; j++)
    array_list[k][j] = 0;
  20. Replies
    9
    Views
    5,699

    I'm working from the source to the goal. So from...

    I'm working from the source to the goal. So from the initial node, there is only one node to consider, then if possible we expand up, down, left, and right with respect to the initial node. The cost...
  21. Replies
    9
    Views
    5,699

    I'm using the A* algorithm. Would the array...

    I'm using the A* algorithm.

    Would the array implementation be used as some sort of queue, like discussed here?
    Queue - Array Implementation - Types
  22. Replies
    9
    Views
    5,699

    Implementing an open/closed list

    Hi,

    I'm not sure what data structure I should use, but here is my situation. I'm implementing a path finding algorithm on a 2d grid map (saved as a 2d array). When I expand from one node to...
  23. Replies
    28
    Views
    2,928

    So have all my elements stored in an integer...

    So have all my elements stored in an integer array. I can start populating my gird map. I have the size of the grip map already (1st line of the input txt file). So I am doing something like this to...
  24. Replies
    28
    Views
    2,928

    but the array was from 0...5 which was six...

    but the array was from 0...5 which was six elements, and now its 0...6 which is 7 elements.
  25. Replies
    28
    Views
    2,928

    That did the trick! Thank you. I should have...

    That did the trick! Thank you. I should have known that an array should be of size N+1 for N elements.
Results 1 to 25 of 37
Page 1 of 2 1 2