/* Copyright by Matthias Hoechsmann (C) 2002 ===================================== You may use, copy and distribute this file freely as long as you - do not change the file, - leave this copyright notice in the file, - do not make any profit with the distribution of this file - give credit where credit is due You are not allowed to copy or distribute this file otherwise The commercial usage and distribution of this file is prohibited Please report bugs and suggestions to */ #include "rnaforestsz.h" #include "rnafuncs.h" #include "ppforestsz.t.cpp" RNAForestSZ::RNAForestSZ(const string &baseStr, const string &viennaStr, const string &name) : PPForestSZ(RNAFuncs::treeSize(viennaStr)), m_baseStr(baseStr), m_viennaStr(viennaStr) { Uint pos,node; Ulong basePairCount,maxDepth; assert(RNAFuncs::isRNAString(baseStr)); RNAFuncs::isViennaString(viennaStr,basePairCount,maxDepth); // check if base string and vienna string have the same length // if(baseStr.length() > 0) // if(baseStr.length() != m_viennaStr.length()) // throw RNAForestExceptionInput(RNAForestExceptionInput::Error_BaseStringAndViennaStringIncompatible); if(name.empty()) m_name="unknown"; else m_name=name; pos=0; node=0; buildForest(pos,node); calcKeyroots(); // debug /* int i; cout << "m_lb:" << endl; for(i=0;i