~ubuntu-branches/debian/jessie/arb/jessie

« back to all changes in this revision

Viewing changes to CONSENSUS_TREE/CT_hash.hxx

  • Committer: Package Import Robot
  • Author(s): Elmar Pruesse, Andreas Tille, Elmar Pruesse
  • Date: 2014-09-02 15:15:06 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140902151506-jihq58b3iz342wif
Tags: 6.0.2-1
[ Andreas Tille ]
* New upstream version
  Closes: #741890
* debian/upstream -> debian/upstream/metadata
* debian/control:
   - Build-Depends: added libglib2.0-dev
   - Depends: added mafft, mrbayes
* debian/rules
   - Add explicite --remove-section=.comment option to manual strip call
* cme fix dpkg-control
* arb-common.dirs: Do not create unneeded lintian dir
* Add turkish debconf translation (thanks for the patch to Mert Dirik
  <mertdirik@gmail.com>)
  Closes: #757497

[ Elmar Pruesse ]
* patches removed:
   - 10_config.makefiles.patch,
     80_no_GL.patch
       removed in favor of creating file from config.makefile.template via 
       sed in debian/control
   - 20_Makefile_main.patch
       merged upstream
   - 21_Makefiles.patch
       no longer needed
   - 30_tmpfile_CVE-2008-5378.patch: 
       merged upstream
   - 50_fix_gcc-4.8.patch:
       merged upstream
   - 40_add_libGLU.patch:
       libGLU not needed for arb_ntree)
   - 60_use_debian_packaged_raxml.patch:
       merged upstream
   - 70_hardening.patch
       merged upstream
   - 72_add_math_lib_to_linker.patch
       does not appear to be needed
* patches added:
   - 10_upstream_r12793__show_db_load_progress:
       backported patch showing progress while ARB is loading a database
       (needed as indicator/splash screen while ARB is launching)
   - 20_upstream_r12794__socket_permissions:
       backported security fix
   - 30_upstream_r12814__desktop_keywords:
       backported add keywords to desktop (fixes lintian warning)
   - 40_upstream_r12815__lintian_spelling:
       backported fix for lintian reported spelling errors
   - 50_private_nameservers
       change configuration to put nameservers into users home dirs
       (avoids need for shared writeable directory)
   - 60_use_debian_phyml
       use phyml from debian package for both interfaces in ARB
* debian/rules:
   - create config.makefile from override_dh_configure target
   - use "make tarfile" in override_dh_install
   - remove extra cleaning not needed for ARB 6
   - use "dh_install --list-missing" to avoid missing files
   - added override_dh_fixperms target
* debian/control:
   - added libarb-dev package
   - Depends: added phyml, xdg-utils
   - Suggests: removed phyml
   - fix lintian duplicate-short-description (new descriptions)
* debian/*.install:
   - "unrolled" confusing globbing to select files
   - pick files from debian/tmp
   - moved all config files to /etc/arb
* debian/arb-common.templates: updated
* scripts:
   - removed arb-add-pt-server
   - launch-wrapper: 
     - only add demo.arb to newly created $ARBUSERDATA
     - pass commandline arguments through bin/arb wrapper
   - preinst: removing old PT server index files on upgrade from 5.5*
   - postinst: set setgid on shared PT dir
* rewrote arb.1 manfile
* added file icon for ARB databases
* using upstream arb_tcp.dat

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
typedef struct hnode {
2
 
    PART *part;
3
 
    struct hnode *next;
4
 
} HNODE;
5
 
 
6
 
struct gbs_hash_struct;
7
 
extern int Tree_count;
8
 
extern gbs_hash_struct *Name_hash;
9
 
#define HASH_MAX 123
10
 
 
11
 
void hash_print(void);
12
 
void hash_init(void);
13
 
void hash_settreecount(int tree_count);
14
 
void hash_free(void);
15
 
PART *hash_getpart(void);
16
 
void hash_insert(PART *part, int weight);
17
 
void build_sorted_list(void);
 
1
// =============================================================== //
 
2
//                                                                 //
 
3
//   File      : CT_hash.hxx                                       //
 
4
//   Purpose   :                                                   //
 
5
//                                                                 //
 
6
//   Institute of Microbiology (Technical University Munich)       //
 
7
//   http://www.arb-home.de/                                       //
 
8
//                                                                 //
 
9
// =============================================================== //
 
10
 
 
11
#ifndef CT_HASH_HXX
 
12
#define CT_HASH_HXX
 
13
 
 
14
#ifndef CT_PART_HXX
 
15
#include "CT_part.hxx"
 
16
#endif
 
17
#ifndef _GLIBCXX_SET
 
18
#include <set>
 
19
#endif
 
20
#ifndef _GLIBCXX_VECTOR
 
21
#include <vector>
 
22
#endif
 
23
 
 
24
typedef PART *PARTptr;
 
25
typedef std::set<PARTptr, bool (*)(const PART *, const PART *)> PartSet;
 
26
typedef std::vector<PARTptr> PartVector;
 
27
 
 
28
inline bool topological_less(const PART *p1, const PART *p2) { return p1->topological_cmp(p2)<0; }
 
29
 
 
30
class PartRegistry : virtual Noncopyable {
 
31
    PartSet    parts;
 
32
    PartSet    artificial_parts; // these occurred in no tree
 
33
    PartVector sorted;
 
34
    size_t     retrieved;
 
35
 
 
36
    bool registration_phase() const { return sorted.empty(); }
 
37
    bool retrieval_phase() const { return !registration_phase(); }
 
38
 
 
39
    void merge_artificial_parts();
 
40
 
 
41
public:
 
42
    PartRegistry()
 
43
        : parts(topological_less),
 
44
          artificial_parts(topological_less),
 
45
          retrieved(0)
 
46
    {
 
47
        arb_assert(registration_phase());
 
48
    }
 
49
    ~PartRegistry();
 
50
 
 
51
    void put_part_from_complete_tree(PART*& part);
 
52
    void put_part_from_partial_tree(PART*& part, const PART *partialTree);
 
53
    void put_artificial_part(PART*& part);
 
54
 
 
55
    void  build_sorted_list(double overall_weight);
 
56
    PART *get_part();
 
57
 
 
58
    size_t size() const {
 
59
        if (registration_phase()) return parts.size()+artificial_parts.size();
 
60
        return sorted.size();
 
61
    }
 
62
};
 
63
 
 
64
#else
 
65
#error CT_hash.hxx included twice
 
66
#endif // CT_HASH_HXX