Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 10ead514 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

graphwriter: split long cycles into smaller parts

parent 71618a17
No related branches found
No related tags found
No related merge requests found
......@@ -9,11 +9,29 @@ using System.Windows.Forms.DataVisualization.Charting;
namespace GraphDrawer
{
internal class Program
{
private static void Main(string[] args)
{
GraphWriter.Write(args[0], args[1]);
}
}
internal class Program
{
private const string HELP = @"
Tool for plotting graphs comparing Vecto 2.2 and Vecto 3
--split <leng> ... split input into parts of length <len> (in m), only distance output
";
private static void Main(string[] args)
{
if (args.Contains("--split")) {
var idx = Array.FindIndex(args, x => x == "--split");
var lenght = int.Parse(args[idx + 1]);
var success = true;
var start = 0;
do {
success = GraphWriter.WriteDistanceSlice(args[0], args[1], start, start + lenght);
start += lenght;
} while (success);
GraphWriter.Write(args[0], args[1]);
}
GraphWriter.Write(args[0], args[1]);
}
}
}
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment