compare static method
(en) Compares two AminoAcidSequence and returns true if they are the same.
(ja) 2つのAminoAcidSequenceを比較し、同じであればtrueを返します。
a
: Sequence 1.b
: Sequence 2.fuzzyComp
: If true, Can contain B,Z,X,J.
Implementation
static bool compare(
AminoAcidSequence a, AminoAcidSequence b, bool fuzzyComp) {
if (a.length() != a.length()) return false;
for (int i = 0; i < a.length(); i++) {
if (fuzzyComp) {
if (!a.sequence[i].type.fuzzyComparison(b.sequence[i].type)) {
return false;
}
} else {
if (a.sequence[i].type != b.sequence[i].type) return false;
}
if (a.sequence[i].infoKey != b.sequence[i].infoKey) return false;
}
return true;
}