NCBI C++ ToolKit
thrdttb0.c
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: thrdttb0.c 32839 2007-03-05 20:41:55Z kazimird $
2 *===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Name: thrdttb0.c
27 *
28 * Author: Stephen Bryant
29 *
30 * Initial Version Creation Date: 08/16/2000
31 *
32 * $Revision: 32839 $
33 *
34 * File Description: threader
35 */
36 
37 
38 
41 
42 /* Initialize thread table, a linked list containing the minimum energy */
43 /* threads found in sampling */
44 
45 /*int*/ void ttb0(Thd_Tbl* ttb) {
46 /*---------------------------------------------------------*/
47 /* ttb: Tables to hold Results of Gibbs sampled threading */
48 /*---------------------------------------------------------*/
49 
50 int i; /* Counter */
51 int n; /* Maximum thread index */
52 
53 n=ttb->n-1;
54 
55 /* Set thread frequencies to zero and initialize linked list. */
56 ttb->tf[0]=0; ttb->ts[0]=0; ttb->nx[0]=1; ttb->tg[0]=BIGNEG;
57 for(i=1; i<n; i++) {
58  ttb->tf[i]=0; ttb->ts[i]=0; ttb->tg[i]=BIGNEG;
59  ttb->ps[i]=BIGNEG; ttb->ms[i]=BIGNEG;
60  ttb->cs[i]=BIGNEG; ttb->lps[i]=BIGNEG;
61  /*ttb->g0[i]=BIGNEG; ttb->zsc[i]=0.0;*/
62  ttb->pr[i]=i-1; ttb->nx[i]=i+1; }
63 ttb->tf[n]=0; ttb->ts[n]=0; ttb->pr[n]=n-1; ttb->tg[n]=BIGNEG;
64 ttb->mx=0;
65 ttb->mn=n;
66 
67 }
int i
yy_size_t n
float * cs
Definition: thrdatd.h:142
int mn
Definition: thrdatd.h:158
float * ms
Definition: thrdatd.h:141
int * pr
Definition: thrdatd.h:155
int * tf
Definition: thrdatd.h:149
int n
Definition: thrdatd.h:159
int * ts
Definition: thrdatd.h:150
float * ps
Definition: thrdatd.h:140
int * nx
Definition: thrdatd.h:156
float * lps
Definition: thrdatd.h:143
float * tg
Definition: thrdatd.h:139
int mx
Definition: thrdatd.h:157
#define BIGNEG
Definition: thrdatd.h:329
void ttb0(Thd_Tbl *ttb)
Definition: thrdttb0.c:45
Modified on Fri Sep 20 14:58:28 2024 by modify_doxy.py rev. 669887