Skip to content

kchristidis/overlap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

overlap

DOI GoDoc Build Status

overlap is a library for identifying overlaps on a list of segments.

Motivation

You are given a list of segments that looks like this:

Candidate Segments

You are asked to identify any overlaps that are longer than m, or which have at least n segments overlapping.

This package allows you to do that, and identify, for instance, an overlap that is longer than 2 years and has at least 100 segments.

Chosen Segments

Installation

$ go get github.com/kchristidis/overlap

Usage

results, _ := overlap.Calculate("segments.csv", True)
f, _ := os.Create("overlaps.csv")
defer f.Close()
w := csv.NewWriter(f)
w.WriteAll(results) // calls Flush internally

You can also study the sample binary provided in cmd/overlap, or read the package documentation in GoDoc.

Contributing

Contributions are welcome. Fork this library and submit a pull request.

About

Identify overlaps on a list of segments

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages