~ubuntu-branches/ubuntu/feisty/ncbi-tools6/feisty

« back to all changes in this revision

Viewing changes to algo/blast/composition_adjustment/optimize_target_freq.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: optimize_target_freq.h,v 1.6 2005/12/01 13:54:04 gertz Exp $
 
1
/* $Id: optimize_target_freq.h,v 1.7 2005/12/19 15:38:01 gertz Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
25
25
 
26
26
/**
27
27
 * @file optimize_target_freq.h
 
28
 * Routines for finding an optimal set of target frequencies for the
 
29
 * purpose of generating a compositionally adjusted score matrix.
 
30
 *
28
31
 * @author E. Michael Gertz
29
 
 *
30
 
 * Exports for optimized_target_freq.c
31
32
 */
32
33
 
33
34
#ifndef __OPTIMIZE_TARGET_FREQ__
39
40
extern "C" {
40
41
#endif
41
42
 
 
43
/**
 
44
 * Find an optimal set of target frequencies for the purpose of
 
45
 * generating a compositionally adjusted score matrix.
 
46
 *
 
47
 * @param x           On exit, the optimal set of target frequencies,
 
48
 *                    interpreted as a two dimensional array in
 
49
 *                    row-major order.  x need not be initialized on
 
50
 *                    entry; any initial value will be ignored.
 
51
 * @param alphsize    the size of the alphabet for this optimization
 
52
 *                    problem.
 
53
 * @param *iterations the total number of iterations used in finding
 
54
 *                    the target frequencies
 
55
 * @param q           a set of target frequencies from a standard
 
56
 *                    matrix
 
57
 * @param row_sums    the required row sums for the target frequencies;
 
58
 *                    the composition of one of the sequences being compared.
 
59
 * @param col_sums    the required column sums for the target frequencies;
 
60
 *                    the composition of the other sequence being compared.
 
61
 * @param constrain_rel_entropy   if true, constrain the relative
 
62
 *                                entropy of the optimal target
 
63
 *                                frequencies to equal
 
64
 *                                relative_entropy
 
65
 * @param relative_entropy  if constrain_rel_entropy is true, then this
 
66
 *                          is the required relative entropy for the
 
67
 *                          optimal target frequencies.  Otherwise,
 
68
 *                          this argument is ignored.
 
69
 * @param maxits    the maximum number of iterations permitted for the
 
70
 *                  optimization algorithm; a good value is 2000.
 
71
 * @param tol       the solution tolerance; the residuals of the optimization
 
72
 *                  program must have Euclidean norm <= tol for the
 
73
 *                  algorithm to terminate.
 
74
 *
 
75
 * @returns         if an optimal set of target frequencies is
 
76
 *                  found, then 0, if the iteration failed to
 
77
 *                  converge, then 1, if there was some error, then -1.
 
78
 */
42
79
NCBI_XBLAST_EXPORT
43
80
int
44
81
Blast_OptimizeTargetFrequencies(double x[],