A library for working with phylogenetic and population genetic data.
v0.32.0
function/genome_locus.hpp File Reference
#include "genesis/population/genome_locus.hpp"
#include "genesis/sequence/sequence_dict.hpp"
#include "genesis/utils/math/common.hpp"
#include <cassert>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#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::population
 

Macros

#define ADD_LOCUS_COMPARISON_OVERLOADS(CMP_FUNC)
 

Functions

int locus_compare (GenomeLocus const &l, GenomeLocus const &r)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (GenomeLocus const &l, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (GenomeLocus const &l, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, genesis::sequence::SequenceDict const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, ::genesis::sequence::SequenceDict const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
int locus_compare (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Three-way comparison (spaceship operator <=>) for two loci in a genome. More...
 
bool locus_equal (GenomeLocus const &l, GenomeLocus const &r)
 Equality comparison (==) for two loci in a genome. More...
 
bool locus_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Equality comparison (==) for two loci in a genome. More...
 
bool locus_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Equality comparison (==) for two loci in a genome. More...
 
bool locus_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Equality comparison (==) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, GenomeLocus const &r)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
bool locus_greater (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Greater than comparison (>) for two loci in a genome. More...
 
bool locus_greater (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, ::genesis::sequence::SequenceDict const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than comparison (>) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, GenomeLocus const &r)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
bool locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
bool locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, ::genesis::sequence::SequenceDict const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
int locus_greater_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
bool locus_inequal (GenomeLocus const &l, GenomeLocus const &r)
 Inequality comparison (!=) for two loci in a genome. More...
 
bool locus_inequal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Inequality comparison (!=) for two loci in a genome. More...
 
bool locus_inequal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Inequality comparison (!=) for two loci in a genome. More...
 
bool locus_inequal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Inequality comparison (!=) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, GenomeLocus const &r)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, genesis::sequence::SequenceDict const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
bool locus_less (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Less than comparison (<) for two loci in a genome. More...
 
bool locus_less (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, ::genesis::sequence::SequenceDict const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than comparison (<) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, GenomeLocus const &r)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, genesis::sequence::SequenceDict const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (GenomeLocus const &l, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, genesis::sequence::SequenceDict const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (std::string const &l_chromosome, size_t l_position, GenomeLocus const &r, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
bool locus_less_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
bool locus_less_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, ::genesis::sequence::SequenceDict const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
int locus_less_or_equal (std::string const &l_chromosome, size_t l_position, std::string const &r_chromosome, size_t r_position, std::shared_ptr< genesis::sequence::SequenceDict > const &sequence_dict)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
bool operator!= (GenomeLocus const &l, GenomeLocus const &r)
 Inequality comparison (!=) for two loci in a genome. More...
 
bool operator< (GenomeLocus const &l, GenomeLocus const &r)
 Less than comparison (<) for two loci in a genome. More...
 
std::ostream & operator<< (std::ostream &os, GenomeLocus const &locus)
 
bool operator<= (GenomeLocus const &l, GenomeLocus const &r)
 Less than or equal comparison (<=) for two loci in a genome. More...
 
bool operator== (GenomeLocus const &l, GenomeLocus const &r)
 Equality comparison (==) for two loci in a genome. More...
 
bool operator> (GenomeLocus const &l, GenomeLocus const &r)
 Greater than comparison (>) for two loci in a genome. More...
 
bool operator>= (GenomeLocus const &l, GenomeLocus const &r)
 Greater than or equal comparison (>=) for two loci in a genome. More...
 
std::string to_string (GenomeLocus const &locus)
 

Macro Definition Documentation

◆ ADD_LOCUS_COMPARISON_OVERLOADS

#define ADD_LOCUS_COMPARISON_OVERLOADS (   CMP_FUNC)

Definition at line 90 of file function/genome_locus.hpp.