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

NCBI C++ ToolKit: include/util/range_coll.hpp Source File

1 #ifndef UTIL___RANGE_COLL__HPP 2 #define UTIL___RANGE_COLL__HPP 44 template

<

class

Range,

class

Position>

50  bool operator()

(

const

Range &R1,

const

Range &R2) {

return

R1.GetToOpen() < R2.GetToOpen(); }

61 template

<

class

Position>

72  typedef typename

TRangeVector::size_type

size_type

;

118  return

lower_bound(

begin

(),

end

(), pos, p);

123  return begin

()->GetFrom();

129  return rbegin

()->GetToOpen();

135  return rbegin

()->GetTo();

150  return rbegin

()->GetToOpen() - From;

161

length += it->GetLength();

274  bool

b_contains = it !=

end

() && it->GetFrom() >= pos;

275  return

make_pair(it, b_contains);

281  bool

b_intersects = it !=

end

() && it->GetFrom() <

r

.GetToOpen();

282  return

make_pair(it, b_intersects);

288  bool

contains =

false

;

290

contains = (it->GetFrom() <=

r

.GetFrom() &&

291

it->GetTo() >=

r

.GetTo());

293  return

make_pair(it, contains);

302  if

(it_right !=

end_nc

()) {

303  if

(it_right->GetFrom() <= pos_to) {

304

it_right->SetTo(pos_to);

313  if

(it_left !=

end_nc

()) {

314  if

(it_left->GetFrom() < pos_from)

315

it_left->SetFrom(pos_from);

333  if

(it_begin_m !=

end_nc

() && it_begin_m->GetFrom() <= pos_to_open) {

334  iterator

it_end_m = lower_bound(it_begin_m,

end_nc

(), pos_to_open, p);

335

it_begin_m->CombineWith(

r

);

337  if

(it_end_m !=

end_nc

() && it_end_m->GetFrom() <= pos_to_open) {

338

it_begin_m->SetToOpen(it_end_m->GetToOpen());

341  m_vRanges

.erase(it_begin_m + 1, it_end_m);

356  if

(it_begin_e !=

end_nc

()) {

358  if

(it_begin_e->GetFrom() < pos_from && it_begin_e->GetToOpen() > pos_to_open) {

360  TRange

it_r = *it_begin_e;

361

it_begin_e =

m_vRanges

.insert(it_begin_e, it_r);

362

it_begin_e->SetToOpen(pos_from);

363

(++it_begin_e)->SetFrom(pos_to_open);

365  if

(it_begin_e->GetFrom() < pos_from) {

366

it_begin_e->SetToOpen(pos_from);

369  iterator

it_end_e = lower_bound(it_begin_e,

end_nc

(), pos_to_open,

P

);

370  if

(it_end_e !=

end_nc

() && it_end_e->GetFrom() < pos_to_open) {

371

it_end_e->SetFrom(pos_to_open);

382

c_iterator = c.

begin

();

383  while

(my_iterator !=

end

() && c_iterator != c.

end

())

387

intersection_ranges.push_back(intersection);

388  if

(my_iterator->GetTo() < c_iterator->GetTo())

400  if

(it !=

end_nc

() && it->GetFrom() <= p && it->GetTo() > p) {

void x_Subtract(const TThisType &c)

TThisType & IntersectWith(const TThisType &c)

void x_IntersectWith(const TRange &r)

position_type GetTo() const

pair< const_iterator, bool > x_Find(position_type pos) const

TThisType & DivideAfter(const position_type &p)

If position is in middle of range, divide into two consecutive ranges after this position.

pair< const_iterator, bool > x_Contains(const TRange &r) const

TRangeVector::const_reverse_iterator const_reverse_iterator

void x_IntersectWith(const TThisType &c)

TRangeVector::const_iterator const_iterator

const_reverse_iterator rend() const

TRangeVector::reverse_iterator reverse_iterator

const_iterator end() const

TThisType & CombineWith(const TRange &r)

iterator x_CombineWith(const TRange &r)

position_type GetLength(void) const

TThisType & operator+=(const TRange &r)

CRange< position_type > TRange

TThisType & Subtract(const TThisType &c)

TThisType & IntersectWith(const TRange &r)

void x_Subtract(const TRange &r)

TThisType & operator-=(const TRange &r)

CRangeCollection(const TRange &r)

bool operator==(const TThisType &c) const

position_type GetToOpen() const

TThisType & operator&=(const TRange &r)

const_iterator begin() const

bool IntersectingWith(const TRange &r) const

pair< const_iterator, bool > x_Intersects(const TRange &r) const

void x_CombineWith(const TThisType &c)

bool Contains(const TRange &r) const

position_type GetFrom() const

TThisType & Subtract(const TRange &r)

const TRange & operator[](size_type pos) const

iterator find_nc(position_type pos)

bool x_Equals(const TThisType &c) const

position_type GetCoveredLength(void) const

Returns total length covered by ranges in this collection, i.e.

const_reverse_iterator rbegin() const

const_iterator find(position_type pos) const

CRangeCollection(const CRangeCollection &c)=default

vector< TRange > TRangeVector

TThisType & CombineWith(const TThisType &c)

CRangeCollection< position_type > TThisType

void x_Divide(const position_type &p)

TRangeVector::size_type size_type

TRangeVector::iterator iterator

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

bool NotEmpty(void) const

TThisType IntersectionWith(const TThisType &r) const

static TThisType GetEmpty(void)

static position_type GetEmptyFrom(void)

static position_type GetEmptyTo(void)

static position_type GetWholeFrom(void)

static position_type GetEmptyToOpen(void)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

The NCBI C++/STL use hints.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

bool operator()(const Range &R1, const Range &R2)

bool operator()(const Range &R, Position Pos)


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