This file is indexed.

/usr/include/libqhullcpp/Qhull.h is in libqhull-dev 2012.1-4.

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
143
144
145
146
147
/****************************************************************************
**
** Copyright (c) 2008-2012 C.B. Barber. All rights reserved.
** $Id: //main/2011/qhull/src/libqhullcpp/Qhull.h#4 $$Change: 1464 $
** $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
**
****************************************************************************/

#ifndef QHULLCPP_H
#define QHULLCPP_H

#include "QhullQh.h"
#include "RboxPoints.h"
#include "QhullLinkedList.h"
#include "QhullPoint.h"
#include "QhullPoints.h"
#include "QhullVertex.h"
#include "QhullFacet.h"

#include <stdarg.h>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>

#if qh_QHpointer != 1
#error  qh_QHpointer is not set.  Please set it in user.h or
#error  compile Qhull with -Dqh_QHpointer.  The C++ classes
#error  require dynamic allocation for Qhulls global data
#error  structure qhT (QhullQh).
#endif

namespace orgQhull {

/***
   Compile qhullcpp and libqhull with the same compiler.  setjmp() and longjmp() must be the same.
*/

#//Types
    //! Qhull -- run Qhull from C++
    class Qhull;

    //Defined elsewhere
    class QhullFacetList;
    class RboxPoints;

class Qhull {

private:
#//Members and friends
    QhullQh            *qhull_qh;       //! qh_qh for this instance
    int                 qhull_run_id;    //! qh.run_id at initialization (catch multiple runs if !qh_QHpointer)
    Coordinates         origin_point;   //! origin for qhull_dimension.  Set by runQhull()
    int                 qhull_status;   //! qh_ERRnone if valid
    int                 qhull_dimension; //! Dimension of result (qh.hull_dim or one less for Delaunay/Voronoi)
    bool                run_called;     //! True at start of runQhull.  Errors if call again.
    bool                qh_active;      //! True if global pointer qh_qh equals qhull_qh
    std::string         qhull_message;
    std::ostream       *error_stream;   //! overrides errorMessage, use appendQhullMessage()
    std::ostream       *output_stream;  //! send output to stream

    friend void       ::qh_fprintf(FILE *fp, int msgcode, const char *fmt, ... );
    friend class        UsingLibQhull;

#//Attribute
public:
    Coordinates         feasiblePoint;  //! feasible point for half-space intersection
    bool                useOutputStream; //! Set if using outputStream
    // FIXUP QH11003 feasiblePoint useOutputStream as field or getter?

#//constructor, assignment, destructor, invariant
                        Qhull();      //! Qhull::runQhull() must be called next
                        Qhull(const RboxPoints &rboxPoints, const char *qhullCommand2);
                        Qhull(const char *rboxCommand2, int pointDimension, int pointCount, const realT *pointCoordinates, const char *qhullCommand2);
                        // Throws error if other.initialized().  Needed for return by value and parameter passing
                        Qhull(const Qhull &other);
                        // Throws error if initialized() or other.initialized().  Needed for vector<Qhull>
    Qhull              &operator=(const Qhull &other);
                       ~Qhull() throw();
private:
    void                initializeQhull();

public:
#//virtual methods
    //FIXUP QH11004 -- qh_memfree, etc. as virtual?

#//Messaging
    void                appendQhullMessage(const std::string &s);
    void                clearQhullMessage();
    std::string         qhullMessage() const;
    bool                hasQhullMessage() const;
    int                 qhullStatus() const;
    void                setErrorStream(std::ostream *os);
    void                setOutputStream(std::ostream *os);

#//GetSet
    void                checkIfQhullInitialized();
    bool                initialized() const { return qhull_dimension>0; }
    int                 dimension() const { return qhull_dimension; }
    int                 hullDimension() const { return qhullQh()->hull_dim; }
                        // non-const due to QhullPoint
    QhullPoint          origin() { QHULL_ASSERT(initialized()); return QhullPoint(dimension(), origin_point.data()); }
    QhullQh            *qhullQh() const { return qhull_qh; };
    int                 runId(); // Modifies my_qhull

#//GetQh -- access to qhT (Qhull's global data structure)
    const char         *qhullCommand() const { return qhull_qh->qhull_command; }
    const char         *rboxCommand() const { return qhull_qh->rbox_command; }
    int                 facetCount() const { return qhull_qh->num_facets; }
    int                 vertexCount() const { return qhull_qh->num_vertices; }

#//GetValue
    double              area();
    double              volume();

#//ForEach
    QhullFacet          beginFacet() const { return QhullFacet(qhull_qh->facet_list); }
    QhullVertex         beginVertex() const { return QhullVertex(qhull_qh->vertex_list); }
    void                defineVertexNeighborFacets(); //!< Automatically called if merging facets or Voronoi diagram
    QhullFacet          endFacet() const { return QhullFacet(qhull_qh->facet_tail); }
    QhullVertex         endVertex() const { return QhullVertex(qhull_qh->vertex_tail); }
    QhullFacetList      facetList() const;
    QhullFacet          firstFacet() const { return beginFacet(); }
    QhullVertex         firstVertex() const { return beginVertex(); }
    QhullPoints         points() const;
    QhullPointSet       otherPoints() const;
                        //! Same as points().coordinates()
    coordT             *pointCoordinateBegin() const { return qhull_qh->first_point; }
    coordT             *pointCoordinateEnd() const { return qhull_qh->first_point + qhull_qh->num_points*qhull_qh->hull_dim; }
    QhullVertexList     vertexList() const;

#//Modify
    void                outputQhull();
    void                outputQhull(const char * outputflags);
    void                runQhull(const RboxPoints &rboxPoints, const char *qhullCommand2);
    void                runQhull(const char *rboxCommand2, int pointDimension, int pointCount, const realT *rboxPoints, const char *qhullCommand2);

private:
#//Helpers
    void                initializeFeasiblePoint(int hulldim);
    void                maybeThrowQhullMessage(int exitCode);
    void                maybeThrowQhullMessage(int exitCode, int noThrow) throw();
};//Qhull

}//namespace orgQhull

#endif // QHULLCPP_H