This file is indexed.

/usr/include/eclib/xsplit_data.h is in libec-dev 20160720-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// FILE xsplit_data.h : Declaration of class ff_data
//////////////////////////////////////////////////////////////////////////
//
// Copyright 1990-2012 Marcus Mo
// 
// This file is part of the eclib package.
// 
// eclib is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at your
// option) any later version.
// 
// eclib is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
// 
// You should have received a copy of the GNU General Public License
// along with eclib; if not, write to the Free Software Foundation,
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
// 
//////////////////////////////////////////////////////////////////////////

#ifndef XSPLIT_DATA_H
#define XSPLIT_DATA_H

// Include headers
#include <iostream>
#include <cstdlib>
#include <cassert>
#include <vector>

// Disable multithreading
// #undef ECLIB_MULTITHREAD

#ifdef ECLIB_MULTITHREAD 
#include <boost/thread/mutex.hpp>
#endif

// Header files for macros and custom data structures
#include "method.h"
#include "smatrix_elim.h"

// Forward declaration of classes ... prevents circular includes.
// form_finder only required as pointer
class form_finder;

// Ennumerate node and child flags, exposed to global scope for outside access
enum nodestatus  { INTERNAL, ALL_OLD, FOUND_NEW, MAX_DEPTH };
enum childstatus { NOT_COMPLETE, COMPLETE, DESTROYED };

/**
 * ff_data (form_finder_data)
 *
 * Class name follows convention of that contained in xsplit.cc for ease of use.
 */
class ff_data {
  public:
    // Constructor, destructor.
    ff_data( form_finder* ff );
    ~ff_data();

#ifdef ECLIB_MULTITHREAD
    void operator()();                              // Executed upon submission to job queue
#endif

    // Getters (to maintain consistency)
    nodestatus     status();                        // Return status of current node
    ssubspace*     abs_space();                     // Return parent absolute subspace
    ssubspace*     rel_space();                     // Return parent relative subspace
    long           depth();                         // Return current depth
    long           subdim();                        // Return subdimension
    long           eig();                           // Return associated eigenvalue
    vector< long > eiglist();                       // Return sequence of eigenvalues
    ff_data*       child( long eig );               // Return pointer to child
    int            numCompleteChildren();           // Return number of complete children
    bool           complete();                      // Return true if all children complete
  
    // Modifiers (available if needed i.e. not a friend class)
    void setStatus( nodestatus s );                 // Store status of current node

    void increaseDepth( long delta = 1 );           // Increase current depth
    void decreaseDepth( long delta = 1 );           // Decrease current depth
    
    void increaseSubmatUsage();                     // Locked counter incrementer

    void storeBplus( vec bp );                      // Store vector bplus
    void storeBminus( vec bm );                     // Store vector bminus
    
    void addChild( long eig, ff_data &child );      // Store new child of current node 
    void eraseChild( long eig );                    // Destroy child given eigenvalue
    void eraseChild( int idx );                     // Destroy child given index
    
    void setParent( ff_data *parent );              // Store parent node pointer
    void setEigenvalue( long eig );                 // Store eigenvalue

    void setChildren( vector<long> eigs );          // Stores number of children
                                                    //  and eigrange
    void childStatus( long eig, childstatus flag ); // Sets completed children
    
    void eraseCompletedChildren();                  // Destroys completed children

    // Make form_finder class a friend to gain access to protected/private methods
    friend class form_finder;

  private:
    form_finder*        ff_;                 // Back-pointer to form_finder class
                                             // Allows access to form_finder methods      

    nodestatus          status_;             // Status of current node
    long                depth_;              // Indicator of current depth
    long                subdim_;             // Dimension of current subspace
    long                eigenvalue_;         // Corresponding eigenvalue
    vector< long >      eigrange_;           // List of all of all eigenvalues at this depth (used by map)
    vector< long >      eiglist_;            // Sequence of eigenvalues leading to current
    vec                 bplus_, bminus_;
    ssubspace*          abs_space_;          // Current absolute subspace (dynamically created)
    ssubspace*          rel_space_;          // Current relative subspace (dynamically created)
    smat                conjmat_;            // Used only when plus==0 and bigmats==1
    smat                the_opmat_;
    smat                submat_;

    ff_data*            parent_;             // Pointer to parent data node
    vector<ff_data*>    children_;           // Pointers to corresponding data nodes
    ff_data*            child_;              // Pointer to favoured child
    int                 numChildren_;        // Number of children
    vector<childstatus> completedChildren_;  // Flags for child completion
    int                 submatUsage_;        // Counter for submat

#ifdef ECLIB_MULTITHREAD
    boost::mutex        childComplete_lock_; // Lock for completed children
    boost::mutex        submat_lock_;        // Lock for submat usage
    boost::mutex        go_up_lock_;         // Lock for go_up() method
#endif

    // Helper methods
    int map( long eig );                    // Map eigenvalue to index
};

#endif

// end of XSPLIT_DATA.H