Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Finding matching regions in file..

Finding matching regions in file..

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmstutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moliate
    wrote on last edited by
    #1

    I'm looking for a way to find matching regions in a file - much like the LCS (diff) algorithm, but optimized for moved data. For example in the two strings below: "milk and coffee" "coffee and milk" LCS will only find a small matching region, " and ", while the strings themself have larger matching regions. Currently I'm using a "sliding windows" approach (similar to rsync) to do this, but it gets a bit slow for large files. Any suggestions or references would be welcome - I'm looking for both heuristics and algorithms. Im also looking for traditional diff heuristics... /Thanks moliate


    The corners of my eyes catch hasty, bloodless motion - a mouse? Well, certainly a peripheral of some kind.

    Neil Gaiman - Cold Colours

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups