#include <stdexcept>
#include <sstream>
#include <fstream>
#include <iostream>
#include <map>
#include "CppUTest/TestHarness.h"
#include "CppUTest/CommandLineTestRunner.h"
#include "cafe_commands.h"
#include "lambda.h"
#include "lambdamu.h"
#include "Globals.h"
#include <gene_family.h>
#include "cafe.h"
#include <cafe_shell.h>
Functions | |
void | cafe_shell_set_lambda (pCafeParam param, double *parameters) |
int | __cafe_cmd_lambda_tree (pCafeParam param, char *arg1, char *arg2) |
int | lambda_cmd_helper (Globals &globals) |
TEST_GROUP (LambdaTests) | |
TEST (LambdaTests, cafe_cmd_lambda_fails_without_tree) | |
TEST (LambdaTests, cafe_cmd_lambda_fails_without_load) | |
TEST (LambdaTests, PrepareCafeParam) | |
TEST (LambdaTests, TestCmdLambda) | |
TEST (LambdaTests, TestLambdaTree) | |
TEST (LambdaTests, Test_arguments) | |
TEST (LambdaTests, Test_l_argument) | |
TEST (LambdaTests, Test_p_argument) | |
TEST (LambdaTests, Test_r_argument) | |
TEST (LambdaTests, set_all_lambdas) | |
TEST (LambdaTests, initialize_params_and_k_weights) | |
TEST (LambdaTests, set_parameters) | |
void | mock_set_params (pCafeParam param, double *parameters) |
TEST (LambdaTests, lambda_set) | |
TEST (LambdaTests, lambda_args__validate_parameter_count) | |
TEST (LambdaTests, lambdamu_args__validate_parameter_count) | |
TEST (LambdaTests, lambdamu_set) | |
TEST (LambdaTests, lambdamu_set_without_lambda_tree) | |
TEST (LambdaTests, lambdamu_set_with_k_weights) | |
TEST (LambdaTests, lambdamu_set_with_k_weights_and_tree) | |
TEST (LambdaTests, best_lambda_by_fminsearch) | |
TEST (LambdaTests, best_lambda_mu_by_fminsearch) | |
TEST (LambdaTests, get_posterior) | |
TEST (LambdaTests, find_poisson_lambda) | |
TEST (LambdaTests, get_posterior2) | |
TEST (LambdaTests, collect_leaf_sizes) | |
Variables | |
pBirthDeathCacheArray | probability_cache |
struct chooseln_cache | cache |
A cache of values of chooseln. More... | |
int __cafe_cmd_lambda_tree | ( | pCafeParam | param, |
char * | arg1, | ||
char * | arg2 | ||
) |
void cafe_shell_set_lambda | ( | pCafeParam | param, |
double * | parameters | ||
) |
int lambda_cmd_helper | ( | Globals & | globals | ) |
void mock_set_params | ( | pCafeParam | param, |
double * | parameters | ||
) |
TEST | ( | LambdaTests | , |
cafe_cmd_lambda_fails_without_tree | |||
) |
TEST | ( | LambdaTests | , |
cafe_cmd_lambda_fails_without_load | |||
) |
TEST | ( | LambdaTests | , |
PrepareCafeParam | |||
) |
TEST | ( | LambdaTests | , |
TestCmdLambda | |||
) |
TEST | ( | LambdaTests | , |
TestLambdaTree | |||
) |
TEST | ( | LambdaTests | , |
Test_arguments | |||
) |
TEST | ( | LambdaTests | , |
Test_l_argument | |||
) |
TEST | ( | LambdaTests | , |
Test_p_argument | |||
) |
TEST | ( | LambdaTests | , |
Test_r_argument | |||
) |
TEST | ( | LambdaTests | , |
set_all_lambdas | |||
) |
TEST | ( | LambdaTests | , |
initialize_params_and_k_weights | |||
) |
TEST | ( | LambdaTests | , |
set_parameters | |||
) |
TEST | ( | LambdaTests | , |
lambda_set | |||
) |
TEST | ( | LambdaTests | , |
lambda_args__validate_parameter_count | |||
) |
TEST | ( | LambdaTests | , |
lambdamu_args__validate_parameter_count | |||
) |
TEST | ( | LambdaTests | , |
lambdamu_set | |||
) |
TEST | ( | LambdaTests | , |
lambdamu_set_without_lambda_tree | |||
) |
TEST | ( | LambdaTests | , |
lambdamu_set_with_k_weights | |||
) |
TEST | ( | LambdaTests | , |
lambdamu_set_with_k_weights_and_tree | |||
) |
TEST | ( | LambdaTests | , |
best_lambda_by_fminsearch | |||
) |
TEST | ( | LambdaTests | , |
best_lambda_mu_by_fminsearch | |||
) |
TEST | ( | LambdaTests | , |
get_posterior | |||
) |
TEST | ( | LambdaTests | , |
find_poisson_lambda | |||
) |
TEST | ( | LambdaTests | , |
get_posterior2 | |||
) |
TEST | ( | LambdaTests | , |
collect_leaf_sizes | |||
) |
TEST_GROUP | ( | LambdaTests | ) |
struct chooseln_cache cache |
A cache of values of chooseln.
Chooseln evaluates the natural logarithm of Gamma(n+1)/(Gamma(k+1)*Gamma(n-k+1)) The cache holds values for integer values of n and k. It does not appear to be threadsafe.
P(X(t) = c | X(0) = s) = {j=0}^{(s,c)} {s}{j}{s+c-j-1}{s-1} ^{s+c-2j}(1-2)^j
pBirthDeathCacheArray probability_cache |
The variable cafe_param is a global singleton that holds general program state. cafe_param holds pcafe, a CafeTree, and pfamily, a CafeFamily . These are set by the user via the commands "tree" and "load" respectively. When the user calls the command "lambda" calculations are performed on the pcafe and pfamily variables.