A toolkit for working with phylogenetic data. v0.24.0 utils/containers/matrix/operators.cpp File Reference
`#include "genesis/utils/containers/matrix/operators.hpp"`
`#include <cmath>`
`#include <iomanip>`
`#include <stdexcept>`

Go to the source code of this file.

## Namespaces

genesis
Container namespace for all symbols of genesis in order to keep them separate when used as a library.

genesis::utils

## Functions

template<>
std::ostream & operator<< (std::ostream &os, const Matrix< signed char > &matrix)
Template specialization for `signed char`, in order to print nicely. More...

template<>
std::ostream & operator<< (std::ostream &os, const Matrix< unsigned char > &matrix)
Template specialization for `unsigned char`, in order to print nicely. More...

template<typename T >
void print_byte_matrix_ (std::ostream &os, const Matrix< T > &matrix, size_t width)
Local helper function to avoid code duplication. More...

size_t triangular_index (size_t i, size_t j, size_t n)
Given indices `i` and `j` in a quadratic Matrix, find the corresponding linear index. More...

std::pair< size_t, size_t > triangular_indices (size_t k, size_t n)
Given a linear index in a upper triangular Matrix, find the corresponding Matrix indices. More...

size_t triangular_size (size_t n)
Calculate the number of linear indices needed for a triangular Matrix of size `n`. More...
{"ft_lang_label":"__label__en","ft_lang_prob":0.59367853,"math_prob":0.8355457,"size":1282,"snap":"2020-45-2020-50","text_gpt3_token_len":318,"char_repetition_ratio":0.1369327,"word_repetition_ratio":0.15306123,"special_character_ratio":0.28393134,"punctuation_ratio":0.23144105,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96238965,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-20T02:26:53Z\",\"WARC-Record-ID\":\"<urn:uuid:82a14fdc-e512-459c-9b2a-b42ff6f31bac>\",\"Content-Length\":\"12235\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:44da055d-d4dd-429d-b6d4-954e05feeace>\",\"WARC-Concurrent-To\":\"<urn:uuid:d415dba0-c81f-4074-8c00-e9f214bc8092>\",\"WARC-IP-Address\":\"46.243.93.147\",\"WARC-Target-URI\":\"http://doc.genesis-lib.org/utils_2containers_2matrix_2operators_8cpp.html\",\"WARC-Payload-Digest\":\"sha1:LHY6SPHD76GTZXFKTHOK2X722QC2RIXD\",\"WARC-Block-Digest\":\"sha1:KNL7AK5L2MFDAOCW6BTBLWI4CNZEUG7Y\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107869785.9_warc_CC-MAIN-20201020021700-20201020051700-00385.warc.gz\"}"}