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/cuSeqTreeAlg_8cpp_source.html below:

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

55  double

midpointDist = 0.0;

58  double

dToNewParent = 0, dToNewChild = 0;

67  if

(oldTree.

size

() == 0) {

78

midpointDist = dmax/2.0;

80  while

(cursor1.

is_valid

() && dToEnd1 < midpointDist) {

81

dToEnd1 += cursor1->distance;

83

cursor1 = tmpTree.

parent

(cursor2);

88  if

(!cursor1.

is_valid

() || !tmpTree.

parent

(cursor1).is_valid()) {

93

item =

SeqItem

(

"New Root"

, -1, dToEnd1-midpointDist);

95

cursor2->distance -= item.

distance

;

96  if

(dToEnd1 == midpointDist) {

97

newTreeRoot = cursor1;

98

cursor1 = tmpTree.

parent

(newTreeRoot);

108

cursor2 = newTreeRoot;

109

dToNewParent = cursor2->distance;

110

cursor2->distance = 0.0;

116

dToNewChild = cursor1->distance;

117

cursor1->distance = dToNewParent;

118

dToNewParent = dToNewChild;

120

cursor1 = tmpTree.

parent

(cursor2);

125

tmpTreeCursor = cursor2.

begin

();

126  while

(tmpTreeCursor != tmpSibling) {

129

tmpTreeCursor->distance += cursor2->distance;

151  if

(nTopLevelNodes == 2) {

157

cursor1 = tmpTree.

end

();

159

cursor1->distance += dToNewParent;

160

}

else if

(nTopLevelNodes > 2) {

164  newTree

.SeqTreeBase::operator=(tmpTree.

reroot

(newTreeRoot));

167  if

(nTopLevelNodes > 2) {

172

newTreeCursor =

newTree

.begin();

173  while

(!found && newTreeCursor !=

newTree

.end()) {

174  if

(*newTreeCursor == item) {

175

sit = newTreeCursor.

begin

();

176  while

(sit != newTreeCursor.

end

()) {

177  if

(*sit == nullItem) {

178

sit->distance = dToNewParent;

183

found = (

count

== 1) ?

true

:

false

;

205  double

rootDMax = 0.0, d1 = 0.0, d2 = 0.0;

207  if

(atree.

size

() < 2) {

209

end1 = atree.

end

();

210

end2 = atree.

end

();

234

it = atree.

begin

();

235  while

(it != atree.

end

() && foundCount < 2) {

236  if

(rootEnd1.

is_valid

() && *it == *rootEnd1) {

239

}

else if

(rootEnd2.is_valid() && *it == *rootEnd2) {

247  if

(foundCount < 2) {

254  if

(

result

&& rootEnd1 != rootEnd2 && rootDMax > 0) {

260

end1 = atree.

end

();

261

end2 = atree.

end

();

275  double

localMax, localBranch1, localBranch2;

279  assert

(dBranch1 >= dBranch2);

290  double

sibDist, testDist;

294  while

(

result

&& sibCursor != cursor.

end

()) {

295

sibDist = sibCursor->distance;

301  result

=

GetMaxPath

(sibCursor, localMax, localBranch1, localEnd1, localBranch2, localEnd2);

303

testDist = localBranch1 + sibDist + dBranch1;

305  if

(localMax > dMax && localMax > testDist) {

310

dBranch1 = localBranch1 + sibDist;

311

dBranch2 = localBranch2 + sibDist;

313

}

else if

(testDist >= localMax && testDist > dMax) {

316  if

(localBranch1 + sibDist > dBranch1) {

320

dBranch1 = localBranch1 + sibDist;

323

dBranch2 = localBranch1 + sibDist;

326

}

else if

(dMax >= localMax && dMax >= testDist) {

static const Rootedness DEF_ROOTED

bool useMidpointRooting()

void midpointRootIfNeeded()

static const string NO_NAME

sibling_iterator end() const

unsigned int number_of_children() const

sibling_iterator begin() const

pre_order_iterator iterator

sibling_iterator previous_sibling(const iterator_base &) const

sibling_iterator next_sibling(const iterator_base &) const

iter append_child(iter position)

tree reroot(iterator newRoot)

pre_order_iterator begin() const

iter insert(iter position, const T &x)

unsigned int number_of_children(const iterator_base &) const

iter reparent(iter position, sibling_iterator begin, sibling_iterator end)

unsigned int number_of_siblings(const iterator_base &) const

pre_order_iterator end() const

bool GetMaxPath(const SeqTree &atree, double &dMax, SeqTree::iterator &end1, SeqTree::iterator &end2)

void MidpointRootSeqTree(const SeqTree &oldTree, SeqTree &newTree)

const double RESET_WITH_TINY_DISTANCE

#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.


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