~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/bin/detci/civect.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef CIVECT_H
2
 
#define CIVECT_H
3
 
 
4
 
typedef unsigned long long int BIGINT;
 
1
/*! \file
 
2
    \ingroup DETCI
 
3
    \brief Enter brief description of file here 
 
4
*/
 
5
#ifndef _psi_src_bin_detci_civect_h
 
6
#define _psi_src_bin_detci_civect_h
 
7
 
 
8
namespace psi { namespace detci {
 
9
 
 
10
//typedef unsigned long long int BIGINT;
 
11
typedef unsigned long int BIGINT;
5
12
 
6
13
/*
7
14
** CIVECT.H
28
35
      int *Ib_size;              /* num bet strings in each block */
29
36
      BIGINT *offset;            /* offsets for absolute numbering.  This
30
37
                                    is a word offset, not a byte offset,
31
 
                                    so unsigned long should be ok, and
32
 
                                    shouldn't have to make this PSI_FPTR */
 
38
                                    so unsigned long should be ok          */
33
39
      int num_alpcodes;          /* number of possible (total) alpha codes */
34
40
      int num_betcodes;          /* number of possible (total) beta codes */
35
41
      int nirreps;               /* dimension of next four arrays */
44
50
      int cur_buf;               /* current buffer in core */
45
51
      int buf_locked;            /* is a memory buffer locked in/available?  */
46
52
      int *units;                /* file numbers */
47
 
      unsigned long *file_offset;/* offsets for vectors/blocks w/in files */ 
48
53
      int *file_number;          /* unit number for given vector/block */
49
54
      unsigned long *buf_size;   /* size of each buffer on disk 
50
55
                                    (0...buf_per_vect) */
59
64
      double ***blocks;          /* a matrix for each block                */
60
65
      double *buffer;            /* pointer to buffer, same as blocks[0][0] */
61
66
      int *zero_blocks;          /* array for which blocks happen to be 0   */
62
 
      int *zero_block_file_number; /* file number for each zero_block array */
63
 
      unsigned long *zero_block_offset; 
64
 
                                 /* offset for zero_block arrays within
65
 
                                    CI vector files */
66
67
      int in_file;               /* increment for how many buffers in a file */
67
 
      unsigned long cur_offset;  /* current offset, necessary for otf
68
 
                                    zero_block constructs */
69
68
      int extras;                /* accounts for extra buffers */
70
69
      int units_used;            /* accounts for number of unit files used */  
71
70
      int cur_unit;              /* current unit file */
72
 
      int **offsets_done;        /* matrix elements of 1(0) if offsets set
73
 
                                    or not */ 
74
71
      int cur_size;              /* current size of buffer */
75
72
      int first_unit;            /* first file unit number (if > 1) */ 
76
73
 
90
87
      void print(FILE *outfile);
91
88
      double operator*(CIvect &b);
92
89
      void set_nvect(int i);
93
 
      void write_detfile(int vector);
94
 
      void reset_detfile(int vector);
95
90
      void setarray(const double *a, int len);
96
91
      void max_abs_vals(int nval, int *iac, int *ibc, int *iaidx, int *ibidx,
97
92
         double *coeff, int neg_only);
171
166
      void set_zero_block(int blocknum, int value);
172
167
      void set_zero_blocks_all(void);
173
168
      void copy_zero_blocks(CIvect &src);
174
 
      void copy_offset_filenumber(CIvect &src);
175
169
      void print_zero_blocks(void);
176
170
      void scale_sigma(CIvect &Hd, CIvect &C,
177
171
        struct stringwr **alplist, struct stringwr **betlist, int i, 
178
172
        double *buf1, double *buf2);
179
 
      void offsets_otf(int ivect, int buf);
180
173
      int read_new_first_buf(void);
181
174
      void write_new_first_buf(void);
182
175
      void set_new_first_buf(int nfb);
228
221
          int targetfile, int writeflag, int printflag);
229
222
};
230
223
 
231
 
#endif  /* CIVECT_H */
 
224
}} // namespace psi::detci
 
225
 
 
226
#endif  // header guard
 
227