A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cuSeqTreeStream_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/structure/cd_utils/cuSeqTreeStream.cpp Source File

46  return

(ch ==

'('

) || (ch ==

')'

) ||(ch ==

','

) ||(ch ==

';'

);

51  return read

(ifs, seqTree);

61  while

((ch !=

'('

) && (is.good()))

77  if

(!

isspace

((

unsigned char

) ch))

93  if

(distance.size() >0)

96  int

colon_loc = distance.find_first_of(

":"

);

98

cursor->name = distance.substr(0, colon_loc);

99

distance = distance.erase(0, colon_loc);

104  if

(distance[0] !=

':'

) {

105  int

semi_loc = distance.find_first_of(

";"

);

107

cursor->name = distance.substr(0, semi_loc);

108

is.putback(distance[semi_loc]);

116  double

dist = atof(distance.c_str());

119

std::cout <<

"Warning: negative branch length! " 120

<< cursor->name <<

", D = "

<< distance << std::endl;

123

cursor->distance = dist;

126

std::cout<<

"Warning: already reached top before processing )"

;

130

cursor = seqTree.

parent

(cursor);

150

ncbi::CNcbiIstrstream iss(

str

);

160  return

ncbi::CNcbiOstrstreamToString(oss);

165  int

nesting_level = 0;

169

std::string::const_iterator sci = s.begin();

172  while

(*sci !=

'('

|| sci == s.end()) {

176  while

(sci != s.end()) {

181  if

(nesting_level != 0 && !line.empty()) {

182

newString.append(line +

"\n"

);

191

}

else if

(*sci ==

')'

) {

193

newString.append(line +

"\n"

);

201  if

(line.length() == 0 && nesting_level > 0) {

212

newString.append(line);

220  if

(newString[newString.length() - 1] !=

';'

) {

221  if

(line.length()==0 || line[line.length() - 1] !=

';'

) {

224

newString.append(line);

244  if

(cursor->rowID >= 0)

245

os<<cursor->rowID<<

'_'

;

246

os<<cursor->name.c_str()<<

':'

<<cursor->distance;

258  while

(sib != cursor.

end

())

264

d = cursor->distance;

267

os<<

") "

<< cursor->name.c_str() <<

":"

<<d;

273

os<<

") "

<< cursor->name.c_str() <<

";"

;

static const int NESTED_INDENT

static void readToDelimiter(std::istream &is, std::string &str)

static std::string toNestedString(const SeqTree &seqTree)

static bool read(std::istream &is, SeqTree &seqTree)

static bool readFromFile(std::ifstream &ifs, SeqTree &seqTree)

static bool write(std::ostream &os, const SeqTree &stree, const SeqTree::iterator &cursor)

static bool writeToFile(std::ofstream &ofs, const SeqTree &seqTree)

static void fromString(const std::string &strTree, SeqTree &seqTree)

static std::string toString(const SeqTree &seqTree)

sibling_iterator end() const

unsigned int number_of_children() const

sibling_iterator begin() const

iter append_child(iter position)

pre_order_iterator begin() const

iter insert(iter position, const T &x)

unsigned int number_of_siblings(const iterator_base &) const

bool isDelimiter(char ch)

static const char * str(char *buf, int n)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

CNcbistrstream_Base< IO_PREFIX::ostrstream, IOS_BASE::out > CNcbiOstrstream


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4