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

NCBI C++ ToolKit: src/algo/blast/api/split_query_blk.cpp Source File

70  static_cast<Uint4>

(chunk_num),

73  throw

runtime_error(

"SplitQueryBlk_GetNumQueriesForChunk"

);

81

vector<size_t> retval;

84  static_cast<Uint4>

(chunk_num),

87  throw

runtime_error(

"SplitQueryBlk_GetQueryIndicesForChunk"

);

89  for

(

int i

= 0; query_indices[

i

] !=

UINT4_MAX

;

i

++) {

90

retval.push_back(query_indices[

i

]);

92  sfree

(query_indices);

101  Uint4

num_contexts = 0;

103  static_cast<Uint4>

(chunk_num),

107  throw

runtime_error(

"SplitQueryBlk_GetQueryContextsForChunk"

);

109  for

(

Uint4 i

= 0;

i

< num_contexts;

i

++) {

110

retval.push_back(query_contexts[

i

]);

112  sfree

(query_contexts);

119

vector<size_t> retval;

122  static_cast<Uint4>

(chunk_num),

125  throw

runtime_error(

"SplitQueryBlk_GetContextOffsetsForChunk"

);

127  for

(

int i

= 0; context_offsets[

i

] !=

UINT4_MAX

;

i

++) {

128

retval.push_back(context_offsets[

i

]);

130  sfree

(context_offsets);

138

pair<size_t, size_t> chunk_bounds(0, 0);

141

&chunk_bounds.second);

143  throw

runtime_error(

"SplitQueryBlk_GetChunkBounds"

);

145

retval.

SetOpen

(

static_cast<unsigned int>

(chunk_bounds.first),

static_cast<unsigned int>

(chunk_bounds.second));

154  static_cast<int>

(chunk_num),

158  throw

runtime_error(

"SplitQueryBlk_SetChunkBounds"

);

166  static_cast<Uint4>

(chunk_num));

168  throw

runtime_error(

"Failed to add query to SplitQueryBlk"

);

176

context_index,

static_cast<Uint4>

(chunk_num));

178  throw

runtime_error(

"Failed to add context to SplitQueryBlk"

);

186

context_offset,

static_cast<Uint4>

(chunk_num));

188  throw

runtime_error(

"Failed to add context offset to " 204  throw

runtime_error(

"Failed to set chunk overlap size in " 214  ERR_POST

(

Warning

<<

"Query-splitting Chunk overlap size was not set"

);

223  out

<< endl <<

"NumChunks = "

<< kNumChunks << endl;

224  for

(

size_t

chunk_num = 0; chunk_num < kNumChunks; chunk_num++) {

225  out

<<

"Chunk"

<< chunk_num <<

"Queries = " 229  for

(

size_t

chunk_num = 0; chunk_num < kNumChunks; chunk_num++) {

230  out

<<

"Chunk"

<< chunk_num <<

"Contexts = " 234  for

(

size_t

chunk_num = 0; chunk_num < kNumChunks; chunk_num++) {

235  out

<<

"Chunk"

<< chunk_num <<

"ContextOffsets = "

Definitions used throughout BLAST.

#define sfree(x)

Safe free a pointer: belongs to a higher level header.

Declares the BLAST exception class.

Defines system exceptions occurred while running BLAST.

Wrapper class around SSplitQueryBlk structure.

std::ofstream out("events_result.xml")

main entry point for tests

SSplitQueryBlk * m_SplitQueryBlk

The structure this object manages.

void AddQueryToChunk(size_t chunk_num, Int4 query_index)

Adds a query index to a given chunk.

TChunkRange GetChunkBounds(size_t chunk_num) const

Get the boundaries of a chunk in the concatenated query.

SSplitQueryBlk * GetCStruct() const

Returns the C structure managed by objects of this class.

~CSplitQueryBlk()

Destructor.

size_t GetNumQueriesForChunk(size_t chunk_num) const

Get the number of queries in a given chunk.

size_t GetNumChunks() const

Retrieve the number of chunks.

void SetChunkOverlapSize(size_t size)

Sets the size (# of bases/residues) of overlap between query chunks.

void SetChunkBounds(size_t chunk_num, const TChunkRange &chunk_range)

Set the boundaries of a chunk in the concatenated query.

void AddContextToChunk(size_t chunk_num, Int4 context_index)

Adds a query context to a given chunk.

ostream & operator<<(ostream &out, const CSplitQueryBlk &rhs)

void AddContextOffsetToChunk(size_t chunk_num, Int4 context_offset)

Adds a context offset (correction) to a given chunk.

size_t GetChunkOverlapSize() const

Gets the size (# of bases/residues) of overlap between query chunks.

vector< size_t > GetQueryIndices(size_t chunk_num) const

Get the indices of the queries contained in a given chunk.

vector< int > GetQueryContexts(size_t chunk_num) const

Get the contexts of the queries contained in a given chunk.

string s_PrintVector(const vector< T > &data2print)

Auxiliary function to print a vector.

vector< size_t > GetContextOffsets(size_t chunk_num) const

Get the context offsets (corrections) of the queries contained in a given chunk.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

void Warning(CExceptionArgs_Base &args)

int16_t Int2

2-byte (16-bit) signed integer

int32_t Int4

4-byte (32-bit) signed integer

uint32_t Uint4

4-byte (32-bit) unsigned integer

position_type GetToOpen(void) const

position_type GetFrom(void) const

TThisType & SetOpen(position_type from, position_type toOpen)

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

const struct ncbi::grid::netcache::search::fields::SIZE size

#define UINT4_MAX

largest number represented by unsigned int.

Int2 SplitQueryBlk_GetChunkBounds(const SSplitQueryBlk *squery_blk, Uint4 chunk_num, size_t *starting_offset, size_t *ending_offset)

Get the query chunk's bounds with respect to the full sized concatenated query.

Int2 SplitQueryBlk_GetQueryIndicesForChunk(const SSplitQueryBlk *squery_blk, Uint4 chunk_num, Uint4 **query_indices)

Retrieve an array of query indices for the requested chunk.

Int2 SplitQueryBlk_GetContextOffsetsForChunk(const SSplitQueryBlk *squery_blk, Uint4 chunk_num, Uint4 **context_offsets)

Retrieve an array of context offsets for the requested chunk.

Int2 SplitQueryBlk_GetQueryContextsForChunk(const SSplitQueryBlk *squery_blk, Uint4 chunk_num, Int4 **query_contexts, Uint4 *num_query_contexts)

Retrieve an array of query contexts for the requested chunk.

Int2 SplitQueryBlk_AddQueryToChunk(SSplitQueryBlk *squery_blk, Uint4 query_index, Uint4 chunk_num)

Add a query index to a given chunk.

SSplitQueryBlk * SplitQueryBlkNew(Uint4 num_chunks, Boolean gapped_merge)

Allocate a new split query chunk structure.

Int2 SplitQueryBlk_SetChunkOverlapSize(SSplitQueryBlk *squery_blk, size_t size)

Sets the query chunk overlap size.

Int2 SplitQueryBlk_SetChunkBounds(SSplitQueryBlk *squery_blk, Uint4 chunk_num, Uint4 starting_offset, Uint4 ending_offset)

Set the query chunk's bounds with respect to the full sized concatenated query.

Int2 SplitQueryBlk_GetNumQueriesForChunk(const SSplitQueryBlk *squery_blk, Uint4 chunk_num, size_t *num_queries)

Retrieve the number of queries that correspond to chunk number chunk_num.

Int2 SplitQueryBlk_AddContextOffsetToChunk(SSplitQueryBlk *squery_blk, Uint4 offset, Uint4 chunk_num)

Add a context offset to a given chunk.

Int2 SplitQueryBlk_AddContextToChunk(SSplitQueryBlk *squery_blk, Int4 ctx_index, Uint4 chunk_num)

Add a query context index to a given chunk.

size_t SplitQueryBlk_GetChunkOverlapSize(const SSplitQueryBlk *squery_blk)

Returns the query chunk overlap size.

SSplitQueryBlk * SplitQueryBlkFree(SSplitQueryBlk *squery_blk)

Deallocate a split query chunk structure.

Auxiliary functions and classes to assist in query splitting.

Definition of C++ wrapper for SSplitQueryBlk.

Structure to keep track of which query sequences are allocated to each query chunk.

Uint4 num_chunks

Total number of chunks.


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