Search:

Type: Posts; User: in_ship

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    2,508

    Nested loops work only if your know the number of...

    Nested loops work only if your know the number of nested loops you want. However, this number varies, depending on the word count of a query and thus, these loops cannot be hard-coded.

    What do you...
  2. Replies
    13
    Views
    2,508

    I tried using the following piece of code...

    I tried using the following piece of code (inspired by stackoverflow), but I get a completely random output now (no words, just characters).




    int main(){

    list<char> lt;
    ...
  3. Replies
    13
    Views
    2,508

    Yes, this is exactly what I mentioned in my...

    Yes, this is exactly what I mentioned in my previous post. The question is now - how to create these n different combinations, which are then input to the permutation black-box.
  4. Replies
    13
    Views
    2,508

    So, I have a vague idea of what can be done here:...

    So, I have a vague idea of what can be done here:
    I can use my function next_perm as before.
    However, I need to now apply it not to the full array, but sub-parts of the array (with length = 1, ......
  5. Replies
    13
    Views
    2,508

    I've used next_perm to perform permutations....

    I've used next_perm to perform permutations. However, I only obtain permutations of same length as the string itself (not of substrings)

    queryArray contains the entire query split into words,...
  6. Replies
    13
    Views
    2,508

    I found another way of doing it, using...

    I found another way of doing it, using next_permutation.

    I have extended the problem a bit: I read a list of queries from a file, compute all its tokens/permutations and lookup whether and how...
  7. Replies
    13
    Views
    2,508

    Generate list of tokens for a query

    Hello there! :eek:


    I'm trying to solve the following problem:



    Given a query with word count n, the total number of tokens is:
    n + n*(n-1) + n*(n-1)*(n-2) + ... + n! (any explicit formula...
  8. Replies
    2
    Views
    1,594

    Compute mean, median mode for map construct

    Hi guys! :)


    I am writing code, which reads an input file (280 MB) containing a list of words. I would like to compute
    1) total # of words
    2) total # of unique/distinct words
    3)...
  9. I think what I was trying to do initially was a...

    I think what I was trying to do initially was a total overkill. This piece of code got the work done in less than 10min.



    /*
    * FileParser.cpp
    *
    * Created on: May 5, 2013
    * Author:...
  10. So - I have adapted the code a bit: 1) Managed to...

    So - I have adapted the code a bit: 1) Managed to resolve the issue with the additional newline (by subtracting last character from string) and 2) Added back_inserter functionality.

    #include...
  11. Hey Elysia! Thanks again for the hints (will...

    Hey Elysia! Thanks again for the hints (will remove the close commands and the template). However, I am wondering whether it is really necessary to have two copy statements. Why not copy things into...
  12. I've uploaded the .cpp, the first .csv file...

    I've uploaded the .cpp, the first .csv file and the output .txt file. You may test it.
  13. Alright - I found a way to integrate...

    Alright - I found a way to integrate stringstream, istream_operator and copy. Here's the current version of the code:
    #include<iostream>
    #include<sstream>
    #include<fstream>
    #include<iterator>...
  14. Thanks! I've made the corresponding changes. I...

    Thanks! I've made the corresponding changes. I think I read on stackoverflow somewhere that the C variant is much faster. But if it causes compatibility issues, I'd be happy to omit it.
  15. Hi whiteflags! Thanks for the advice! Since I've...

    Hi whiteflags! Thanks for the advice! Since I've started with C/C++ now, I would like to continue down this line. Might use python for some similar processing that comes up.
  16. I'm trying my best to familiarize myself with a...

    I'm trying my best to familiarize myself with a new language. Please bear with me.

    So - I tried making use of stringstream.


    // 2) Start writing into output file
    string outfilename =...
  17. Hey Elysia! Thanks a lot for your help! I managed...

    Hey Elysia! Thanks a lot for your help! I managed to get enumeration + tab separation + reading parts of each line done. However, I am facing some issues with the last entry of the line (the stopping...
  18. Reading 2 csv files and combining their content into an output

    Hello there! :)

    I am new to C/C++ and I'm trying to solve a simple problem efficiently:

    I would like to read two very data-intensive .csv files, format and combine the content into a .txt file....
  19. Replies
    10
    Views
    4,288

    mpi_kmeans does not really have a main-file....

    mpi_kmeans does not really have a main-file.
    However, mpi_kmeans_main.cxx does!
    Can I somehow link them together?


    Here's the Makefile (compile with make matlab)


    #
    # Choose your compiler
  20. Replies
    10
    Views
    4,288

    Hey Tim! There is still some issue here. ...

    Hey Tim!

    There is still some issue here.



    I used the library path on my system to be '/usr/lib/gcc/i686-apple-darwin10/4.2.1/'
    Could this be an issue?
  21. Replies
    10
    Views
    4,288

    Hey stahta01! Thanks for the heads-up! I...

    Hey stahta01!

    Thanks for the heads-up!

    I did try that too. Unfortunately though, I still get errors:


    I understand that there is an incompatibility problem, but which library must be...
  22. Replies
    10
    Views
    4,288

    I change the gcc command in the first line to...

    I change the gcc command in the first line to g++. The references error vanished, but now I seem to have library connection problem! :-(
    The code in the Makefile is bold and the errors are...
  23. Replies
    10
    Views
    4,288

    Here's an edit from my side: I tried what you...

    Here's an edit from my side:

    I tried what you recommended, i.e. I used a different order for the 3 compile commands and replaced g++ with gcc


    gcc -shared -fPIC -O3 -ffast-math...
  24. Replies
    10
    Views
    4,288

    Hey Salem! Thanks for your willingness to...

    Hey Salem!

    Thanks for your willingness to help! :)

    I've removed the .so file command and changed g++ to gcc. Unfortunately though, I still seem to be getting an error on the g++ reference:
  25. Replies
    10
    Views
    4,288

    Undefined symbol errors in MEX compilation

    Hi there! ;)

    I am currently trying to run someone else's code on my machine (Link).
    The precompiled MEX files are available for a Linux 64-bit machine. However, I am trying to run it on a Mac...
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4