Results 1 to 5 of 5

Thread: File based merge sort

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default File based merge sort

    Hi!

    I try to solve word count problem (calculate count of each word in files array) with very big set of data - larger than my pc's memory (RAM).

    Format of each file:
    string: int
    string: int

    I can save intermediate results in files, but at the end i'll have hundreds of files, each of them is equal in size than my pc's memory.

    Can i merge all this intermediate files in 1 with Qt tools? Is there an implementation of merge sort algorithm in qt or community code? Like this http://adaszewski.fachowcy.pl/file-based-merge-sort/ but working with Qt data containers like QMap?

    Thank you for help!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: File based merge sort

    I can save intermediate results in files
    What exactly is an intermediate result?
    What is such a result made of in terms of data?
    I don't understand why intermediate results should consume so much memory...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 0
    Last Post: 31st July 2010, 17:27
  2. How to sort a Qlist AND get a sort key?
    By agerlach in forum Qt Programming
    Replies: 3
    Last Post: 26th July 2010, 18:44
  3. How to merge two QPixmaps in to one.
    By live_07 in forum Qt Programming
    Replies: 2
    Last Post: 23rd September 2009, 08:19
  4. How to merge two QPixmaps in to one.
    By babu198649 in forum Newbie
    Replies: 1
    Last Post: 17th August 2008, 13:59
  5. Can I split file and merge them.
    By safknw in forum Newbie
    Replies: 1
    Last Post: 3rd October 2006, 09:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.