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

NCBI C++ ToolKit: src/objects/biotree/DistanceMatrix.cpp Source File

59  throw

runtime_error(

"mismatch between number of labels " 60  "and number of distances"

);

65  for

(

size_t

j = 0; j < sz; ++j) {

66  for

(

size_t i

= j + 1;

i

< sz; ++

i

) {

78  throw

runtime_error(

"matrix is not square"

);

81  for

(

size_t i

= 0;

i

< sz; ++

i

) {

82  if

(mat(

i

,

i

) != 0) {

83  throw

runtime_error(

"element on main diagonal is nonzero"

);

85  for

(

size_t

j = 0; j < sz; ++j) {

86  if

(mat(

i

, j) != mat(j,

i

)) {

87  throw

runtime_error(

"matrix is not symmetric"

);

94  for

(

size_t

j = 0; j < sz; ++j) {

95  for

(

size_t i

= j + 1;

i

< sz; ++

i

) {

110  catch

(std::exception&) {

111

istr.seekg(init_pos);

117  catch

(std::exception&) {

118

istr.seekg(init_pos);

129

vector<string>

names

;

130

vector<vector<double> > values;

132  for

(

unsigned int i

= 0;

i

< dim; ++

i

) {

133  unsigned int count

= 0;

134

vector<double> line_values;

135  unsigned int

min_expected_cols, max_expected_cols;

137

min_expected_cols = dim;

138

max_expected_cols = dim;

140

min_expected_cols =

i

;

141

max_expected_cols =

i

+ 1;

143

min_expected_cols = dim -

i

;

144

max_expected_cols = dim -

i

;

146  throw

runtime_error(

"invald matrix format specified"

);

151  throw

runtime_error(

"unexpected EOF"

);

154  throw

runtime_error(

"problem reading file"

);

158  names

.push_back(name);

159

line = line.substr(10);

163  ITERATE

(list<string>, field, fields) {

166  if

(line_values.size() > max_expected_cols) {

167  throw

runtime_error(

"too many columns in row"

);

169  if

(line_values.size() >= min_expected_cols) {

174

values.push_back(line_values);

177  for

(

unsigned int i

= 0;

i

< dim; ++

i

) {

178  for

(

unsigned int

j = 0; j < dim; ++j) {

180

mat(

i

, j) = values[

i

][j];

183

mat(

i

, j) = values[j][

i

];

185

mat(

i

, j) = values[

i

][j];

189  if

(values[

i

].

size

() ==

i

+ 1) {

191

mat(

i

, j) = values[

i

][j];

196

mat(

i

, j) = values[

i

][j];

198

mat(

i

, j) = values[j][

i

];

User-defined methods of the data storage class.

void FromMatrix(const CNcbiMatrix< double > &mat)

void Read(istream &istr, EFormat format=eGuess)

void AsMatrix(CNcbiMatrix< double > &mat) const

void Resize(size_t i, size_t j, T val=T())

resize this matrix, filling the empty cells with a known value

void Set(T val)

set all values in the matrix to a known value

size_t GetRows() const

get the number of rows in this matrix

size_t GetCols() const

get the number of columns in this matrix

static const struct name_t names[]

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

CNcbiIstream & NcbiGetlineEOL(CNcbiIstream &is, string &str, string::size_type *count=NULL)

Read from "is" to "str" the next line (taking into account platform specifics of End-of-Line)

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to unsigned int.

static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

void ResetLabels(void)

Reset Labels data member.

void ResetDistances(void)

Reset Distances data member.

TDistances & SetDistances(void)

Assign a value to Distances data member.

const TDistances & GetDistances(void) const

Get the Distances member data.

const TLabels & GetLabels(void) const

Get the Labels member data.

TLabels & SetLabels(void)

Assign a value to Labels data member.

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

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


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