public void NaiveKruskalArtificial()
{
Shred.BUFFER = 0;
Shred.SAMPLE_SIZE = 4;
var path = Path.Combine(Drive.GetDriveRoot(), Dir.ArtificialTestDirectory, Dir.NaiveKruskalHttpDocument);
var shreds = Shred.Factory("image", path, false);
var results = Reconstructor.NaiveKruskalAlgorithm(shreds);
var checker = Helpers.BuildChecker(Path.Combine(path, Helpers.CheckFile));
shreds.ForEach(shred => Console.Write(" " + shred.Id + ", "));
Console.WriteLine();
results.ForEach(shred => Console.Write(" " + shred.Id + ", "));
Console.WriteLine();
var indicies = results.Select((t, pos) => new Tuple <int, Shred>(pos, t)).ToList();
var result = indicies.Select(pair =>
{
var filename = Path.GetFileName(pair.Item2.Filepath);
Assert.IsNotNull(filename);
Assert.IsNotNull(checker[filename]);
var expected = checker[filename];
var actual = pair.Item1;
Console.WriteLine("Actual " + actual + " vs. " + expected + " | File: " + filename);
return(actual.ToString(CultureInfo.InvariantCulture) == expected);
}).ToList();
// var diff = Differ.DiffShredByOrder(results.Select(shred => shred.Id).ToList(),
//Enumerable.Range(0, results.Count).Select(ii => (long)ii).ToList());
// Console.WriteLine("Difference : " + diff);
ExportResult((Cluster)shreds.First().Root(), "../../visualizer/NaiveKruskalArtifical.png");
}