Search:

Type: Posts; User: acosgaya

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,548

    thanks grumpy, I understand the broken design...

    thanks grumpy, I understand the broken design point; do you care to explain what is really going on inside this technique
  2. Replies
    9
    Views
    1,548

    thanks for the ideas, but changing i_Value to be...

    thanks for the ideas, but changing i_Value to be a pointer, is not an option.
  3. Replies
    9
    Views
    1,548

    assignment operator

    Hi need to implement assignment operator for class TFoo below such that the code in main will operate as indicated.

    I have these assumptions:
    a) the constructor/destructor code for Foo has been...
  4. Replies
    5
    Views
    981

    Hi thanks for the reply, I came up with the...

    Hi thanks for the reply,
    I came up with the following, seems to be working, but I'd like a second opinion



    template <class InputIterator1, class InputIterator2, class OutputIterator>...
  5. Replies
    5
    Views
    981

    I was trying combine them by doing the following,...

    I was trying combine them by doing the following, but is not correct yet



    template <class InputIterator1, class InputIterator2, class OutputIterator>
    OutputIterator...
  6. Replies
    5
    Views
    981

    combine unique and set_difference

    Hi,
    I want to combine std::unique and std::set_difference into one single procedure.

    For instance, I have now this


    // A & B are both already sorted

    new_end = std::unique(A->begin(),...
  7. no, it is less than that.... but I realized that...

    no, it is less than that.... but I realized that it's silly to do what I want in a copy constructor or assignment operator, I better create a function that does copy only the chunk of the buffer that...
  8. assignment operator for static array inside a class

    Hi I have the following code (shown below) which is a class brt_node with 3 members, one of them being an static array called "buffer", the elements of this buffer are pairs (int, CDataType), the...
  9. Replies
    4
    Views
    1,305

    thanks for the reply, however, I'd really like...

    thanks for the reply,

    however, I'd really like to learn how to translate the recursive code into an iterative one in a more traditional way. Is something that is bugging me :)

    I'd appreciate...
  10. Replies
    4
    Views
    1,305

    recursion into loop

    Hi,

    I am trying to compute the strongly connected components of a graph. I have my recursive program, but due to stack overflow problem, I want to turn it into an iterative one. However, I am...
  11. Replies
    3
    Views
    983

    tks for the replies, I did this and seems to...

    tks for the replies,

    I did this and seems to be working:



    bool operator() (const Edge &e1, const Edge &e2) const
    {

    if (e1.weight() > e2.weight())
  12. Replies
    3
    Views
    983

    sorting a vector

    Hi,

    I'd like some help to do the following:

    I have an stl::vector, with elements of this form (I'm showing only the basic operations in the class)



    class Edge {
  13. Replies
    5
    Views
    2,568

    I fixed it, now it works. Here is how it looks...

    I fixed it, now it works. Here is how it looks now (below). However I still have a small bug.
    the structure of my file looks something like this:
    23 1 0
    43 0 1
    56 0 1
    ...

    The fist column is...
  14. Replies
    5
    Views
    2,568

    here it is, Building file: ../extsort.cpp...

    here it is,


    Building file: ../extsort.cpp
    Invoking: GCC C++ Compiler
    g++ -O0 -g3 -Wall -c -fmessage-length=0 -oextsort.o ../extsort.cpp...
  15. Replies
    5
    Views
    2,568

    external memory sorting

    Hi,

    I am trying to use an external sort method I found in this book:
    http://www.informatik.hs-bremen.de/~brey/stlbe.html

    the interface is this:



    int main() {
  16. Thread: r-Tree

    by acosgaya
    Replies
    1
    Views
    1,328

    r-Tree

    Hi,

    I am looking for a good implementation of an R-Tree or R*-Tree in C or C++, does anybody now where I can find one?

    Thanks
  17. Replies
    5
    Views
    1,586

    Hi, It seems that now with the added condition...

    Hi,
    It seems that now with the added condition to my procedure, the recursion stops properly.
    But now I have a similar problem in another recursion inside MergeBasic. I have written my code below....
  18. Replies
    5
    Views
    1,586

    I tried, but it does not stop if...

    I tried, but it does not stop


    if (M.size()<=1){

    return M;

    }
  19. Replies
    5
    Views
    1,586

    stop a recursion

    hi,
    I am implementing an algorithm, but I am having problems stopping my recursion. Basically, my procedure partitions a set of d-dimensional points (stored in a vector of vectors) according to the...
  20. Replies
    3
    Views
    1,193

    thanks I did the following , and it seems to...

    thanks
    I did the following , and it seems to work


    class vec_part{
    public:
    vec_part(const int index = 0, const int median = 0): i(index), m(median) {}
    bool operator ()(const vector<int>...
  21. Replies
    3
    Views
    1,193

    stable_partition

    hi,

    i have a vector of vectors representing a set of d-dimensional points.



    vector < vector <int> > points


    I want to use the stl algorithm stable_partition to partition the set...
  22. Replies
    3
    Views
    2,231

    max element in vector

    Hello,

    is it possible to use the stl MAX_ELEMENT algorithm to find the max value in a vector of vectors.
    Say I have the following 5 x 3 matrix represented in a vec. of vec.

    1 4 5
    3 5 8
    2 9...
  23. Replies
    1
    Views
    1,341

    load matrix into a vector of vectors

    hi,

    is there an efficient for to insert the elements of a 2d array into a vector of vectors?
    I have


    vector< vector <int> > Points

    for (i = 0; i < n; i++ )
    ...
  24. Replies
    3
    Views
    1,651

    concatenate text files

    Hi,

    at a given time in a program I am developing, I need to concatenate several text files, and place the result in a new one.

    Is there an efficient way of doing this?

    Thank
  25. Replies
    1
    Views
    1,178

    partition a vector of vectors

    hi,

    I am working in this problem, where I have a set of N d-dimensional points, e.g. (4,5,6,8) (2,0,4,6), are 4-d points, which I have stored in a vector of vectors.

    I am trying to partition...
Results 1 to 25 of 28
Page 1 of 2 1 2