Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

matvec::Chromosome Class Reference

#include <chromosome.h>

List of all members.


Detailed Description

A chromosome.

See also:
Genome

Definition at line 55 of file chromosome.h.

Public Methods

 Chromosome (void)
 Chromosome (const Chromosome &A)
 ~Chromosome (void)
const Chromosome & operator= (const Chromosome &A)
void id (const unsigned newid)
void freq (const double new_f)
void resize (const unsigned nl)
double freq (void) const
unsigned nloci (void)
unsigned id (void) const

Public Attributes

Locuslocus

Protected Methods

void copyfrom (const Chromosome &A)

Protected Attributes

unsigned chrom_id
unsigned numloci
double chrom_freq


Constructor & Destructor Documentation

matvec::Chromosome::Chromosome void    [inline]
 

Definition at line 64 of file chromosome.h.

References numloci.

00064 {numloci=0; locus = 0;}

matvec::Chromosome::Chromosome const Chromosome &    A [inline]
 

Definition at line 65 of file chromosome.h.

References copyfrom().

00065 {copyfrom(A);}

matvec::Chromosome::~Chromosome void    [inline]
 

Definition at line 66 of file chromosome.h.

00066 { if(locus) {delete [] locus; locus = 0;}}


Member Function Documentation

void matvec::Chromosome::copyfrom const Chromosome &    A [protected]
 

Definition at line 46 of file chromosome.cpp.

References chrom_freq, chrom_id, locus, numloci, and resize().

Referenced by Chromosome(), and operator=().

00047 {
00048    if (this == &A) return;
00049    chrom_id   = A.chrom_id;
00050    chrom_freq = A.chrom_freq;
00051    resize(A.numloci);
00052    for (unsigned i=0; i<numloci; i++) locus[i] = A.locus[i];
00053 }

double matvec::Chromosome::freq void    const [inline]
 

Definition at line 74 of file chromosome.h.

References chrom_freq.

00074 {return chrom_freq;}

void matvec::Chromosome::freq const double    new_f [inline]
 

Definition at line 71 of file chromosome.h.

References chrom_freq.

Referenced by matvec::Population::build_pop_gamete(), matvec::Population::cond_genotype_config(), matvec::Population::ind_gamete(), and matvec::Model::minfun_peeling().

00071 {chrom_freq = new_f;}

unsigned matvec::Chromosome::id void    const [inline]
 

Definition at line 76 of file chromosome.h.

References chrom_id.

00076 {return chrom_id;}

void matvec::Chromosome::id const unsigned    newid [inline]
 

Definition at line 70 of file chromosome.h.

References chrom_id.

Referenced by matvec::Population::build_pop_gamete(), matvec::Genome::chrom_id(), matvec::Individual::maternal_chrom_id(), and matvec::Individual::paternal_chrom_id().

00070 {chrom_id = newid;}

unsigned matvec::Chromosome::nloci void    [inline]
 

Definition at line 75 of file chromosome.h.

References numloci.

Referenced by matvec::Genome::chrom_id(), matvec::Population::display(), and matvec::Population::ind_gamete().

00075 {return numloci;}

const Chromosome & matvec::Chromosome::operator= const Chromosome &    A
 

Definition at line 40 of file chromosome.cpp.

References copyfrom().

00041 {
00042    copyfrom(A);
00043    return *this;
00044 }

void matvec::Chromosome::resize const unsigned    nl
 

Definition at line 55 of file chromosome.cpp.

References locus, and numloci.

Referenced by copyfrom(), matvec::Genome::remodel(), and matvec::Genome::resize().

00056 {
00057    if (numloci == nl) return;
00058    numloci = nl;
00059    if (locus) {
00060      delete locus;
00061      locus = 0;
00062    }
00063    if (numloci>0){
00064      locus = new Locus [numloci];
00065    }
00066    else {
00067      locus = 0;
00068    }
00069    assert(locus);
00070 }


Member Data Documentation

double matvec::Chromosome::chrom_freq [protected]
 

Definition at line 58 of file chromosome.h.

Referenced by copyfrom(), and freq().

unsigned matvec::Chromosome::chrom_id [protected]
 

Definition at line 57 of file chromosome.h.

Referenced by copyfrom(), and id().

Locus* matvec::Chromosome::locus
 

Definition at line 62 of file chromosome.h.

Referenced by matvec::Population::add_Gv_inv(), matvec::Population::build_connected_groups(), matvec::Population::build_founder_allele_neighbors(), matvec::Population::build_pop_gamete(), matvec::Genome::chrom_id(), copyfrom(), matvec::Population::display(), matvec::Population::finishUpAlleleStateInit(), matvec::Individual::getAllelePenetrance(), matvec::Population::ind_gamete(), matvec::Individual::initial_multi_anterior(), matvec::Individual::initial_multi_m_anterior(), matvec::Population::input_data(), matvec::Population::input_markerData(), matvec::Population::ListAlleleFounders(), matvec::Population::multi_m_log_likelihood_peeling(), matvec::Population::relv(), resize(), matvec::Individual::save(), matvec::Individual::search_heteroz(), matvec::Individual::set_genotype(), matvec::Individual::set_switch(), matvec::Individual::setFounderHaplotype(), matvec::Population::SimpleGenotypeElimination(), and matvec::Population::update_allele_vectors().

unsigned matvec::Chromosome::numloci [protected]
 

Definition at line 57 of file chromosome.h.

Referenced by Chromosome(), copyfrom(), nloci(), and resize().


The documentation for this class was generated from the following files:
Generated on Thu Jun 16 17:14:18 2005 for Matvec by doxygen1.2.16