MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / isFileSimilar

Function isFileSimilar

src/openms/source/CONCEPT/ClassTest.cpp:646–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644 }
645
646 bool
647 isFileSimilar(const std::string& filename_1,
648 const std::string& filename_2)
649 {
650 fuzzy_message.clear();
651 FuzzyStringComparator fsc;
652 fsc.setAcceptableAbsolute(absdiff_max_allowed);
653 fsc.setAcceptableRelative(ratio_max_allowed);
654 fsc.setVerboseLevel(2);
655 fsc.setWhitelist(whitelist);
656 std::ostringstream os;
657 fsc.setLogDestination(os);
658 fsc.use_prefix_ = true;
659
660 bool result = fsc.compareFiles(filename_1, filename_2);
661
662 fuzzy_message = os.str();
663 absdiff = fsc.absdiff_max_;
664 ratio = fsc.ratio_max_;
665 line_num_1_max = fsc.line_num_1_max_;
666 line_num_2_max = fsc.line_num_2_max_;
667
668 return result;
669 }
670
671
672 void printLastException(std::ostream& out)

Callers

nothing calls this directly

Calls 7

setAcceptableAbsoluteMethod · 0.80
setAcceptableRelativeMethod · 0.80
setVerboseLevelMethod · 0.80
setWhitelistMethod · 0.80
setLogDestinationMethod · 0.80
compareFilesMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected