NCBI C++ ToolKit
src
algo
structure
threader
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
39
#include <
algo/structure/threader/thrdatd.h
>
40
#include <
algo/structure/threader/thrddecl.h
>
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
}
i
int i
Definition:
lex.newick.cpp:1456
n
yy_size_t n
Definition:
lex.newick.cpp:1455
_Thd_Tbl
Definition:
thrdatd.h:138
_Thd_Tbl::cs
float * cs
Definition:
thrdatd.h:142
_Thd_Tbl::mn
int mn
Definition:
thrdatd.h:158
_Thd_Tbl::ms
float * ms
Definition:
thrdatd.h:141
_Thd_Tbl::pr
int * pr
Definition:
thrdatd.h:155
_Thd_Tbl::tf
int * tf
Definition:
thrdatd.h:149
_Thd_Tbl::n
int n
Definition:
thrdatd.h:159
_Thd_Tbl::ts
int * ts
Definition:
thrdatd.h:150
_Thd_Tbl::ps
float * ps
Definition:
thrdatd.h:140
_Thd_Tbl::nx
int * nx
Definition:
thrdatd.h:156
_Thd_Tbl::lps
float * lps
Definition:
thrdatd.h:143
_Thd_Tbl::tg
float * tg
Definition:
thrdatd.h:139
_Thd_Tbl::mx
int mx
Definition:
thrdatd.h:157
thrdatd.h
BIGNEG
#define BIGNEG
Definition:
thrdatd.h:329
thrddecl.h
ttb0
void ttb0(Thd_Tbl *ttb)
Definition:
thrdttb0.c:45
Generated by
1.9.0
Modified on Fri Sep 20 14:58:28 2024 by modify_doxy.py rev. 669887