This file is indexed.

/usr/include/CGAL/Interval_traits.h is in libcgal-dev 4.7-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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// Copyright (c) 2008 Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
// 
//
// Author(s)     : Michael Hemmer <hemmer@mpi-inf.mpg.de>
//
// ============================================================================


/*! \file CGAL/Interval_traits.h
     This is experimental 
*/


/* bounds-related Interval functions */
// template<class Interval>  T lower(const Interval& x);
// template<class Interval>  T upper(const Interval& x);
// template<class Interval>  T width(const Interval& x);
// template<class Interval>  T median(const Interval& x);
// template<class Interval>  T norm(const Interval& x);

/* bounds-related Interval functions */
//// template<class Interval>  bool empty(const Interval& b); 
// template<class Interval>  bool singleton(const Interval& x);
// template<class Interval>  bool zero_in(const Interval& b);
// template<class Interval>  bool in(const T& r, const Interval& b);
// template<class Interval>  bool equal(const Interval& x, const Interval& y);
// template<class Interval>  bool overlap(const Interval& x, const Interval& y);
// template<class Interval>  bool subset(const Interval& a, const Interval& b);
// template<class Interval>  bool proper_subset(const Interval& a, const Interval& b);

/* set manipulation interval functions */
// template<class Interval>  Interval intersection(const Interval& x, const Interval& y);
// template<class Interval>  Interval hull(const Interval& x, const Interval& y);


#ifndef CGAL_INTERVAL_TRAITS_H
#define CGAL_INTERVAL_TRAITS_H

#include <CGAL/config.h>
#include <CGAL/tags.h>
#include <boost/type_traits/is_same.hpp>
#include <boost/utility/enable_if.hpp>

namespace CGAL {

namespace internal{

template<typename T> class Interval_traits_base{
public:
  typedef Interval_traits_base<T> Self; 
  typedef T                  Type;
  // typedef T                  Interval; 
  typedef CGAL::Tag_false    Is_interval; 
  typedef CGAL::Tag_false    With_empty_interval; 
  
  typedef CGAL::Null_functor Lower;
  typedef CGAL::Null_functor Upper; 
  typedef CGAL::Null_functor Width; 
  typedef CGAL::Null_functor Median;  
  typedef CGAL::Null_functor Norm; 
  typedef CGAL::Null_functor Empty;
  typedef CGAL::Null_functor Singleton;
  typedef CGAL::Null_functor In;
  typedef CGAL::Null_functor Zero_in;
  typedef CGAL::Null_functor Equal;
  typedef CGAL::Null_functor Overlap;
  typedef CGAL::Null_functor Subset;
  typedef CGAL::Null_functor Proper_Subset;
  typedef CGAL::Null_functor Intersection;
  typedef CGAL::Null_functor Hull;
};
}

template <typename T> class Interval_traits : public internal::Interval_traits_base<T>{};

class Exception_intersection_is_empty{}; 

// function returning type Bound 
template<typename Interval> inline 
typename Interval_traits<Interval>::Bound 
lower(const Interval& interval) {
    typename Interval_traits<Interval>::Lower lower;
    return lower(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Bound 
upper(const Interval& interval) {
    typename Interval_traits<Interval>::Upper upper;
    return upper(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Bound
width(Interval interval) {
    typename Interval_traits<Interval>::Width width;
    return width(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Bound
median(Interval interval) {
    typename Interval_traits<Interval>::Median median;
    return median(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Bound
norm(Interval interval) {
    typename Interval_traits<Interval>::Norm norm;
    return norm(interval);
}


// functions returning bool 

template<typename Interval> inline 
typename Interval_traits<Interval>::Empty::result_type 
empty(Interval interval) {
    typename Interval_traits<Interval>::Empty empty;
    return empty(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Singleton::result_type  
singleton(Interval interval) {
    typename Interval_traits<Interval>::Singleton singleton;
    return singleton(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::In::result_type  
in(typename Interval_traits<Interval>::Bound x, Interval interval) {
    typename Interval_traits<Interval>::In in;
    return in(x,interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Zero_in::result_type
zero_in(Interval interval) {
    typename Interval_traits<Interval>::Zero_in zero_in;
    return zero_in(interval);
}

// This ones should be removed, since even boost_1_35_0 has changed to zero_in
template<typename Interval> inline 
typename Interval_traits<Interval>::Zero_in::result_type
in_zero(Interval interval) {
    typename Interval_traits<Interval>::Zero_in zero_in;
    return zero_in(interval);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Equal::result_type
equal(Interval interval1,Interval interval2) {
    typename Interval_traits<Interval>::Equal equal;
    return equal(interval1,interval2);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Overlap::result_type
overlap(Interval interval1, Interval interval2) {
    typename Interval_traits<Interval>::Overlap overlap;
    return overlap(interval1, interval2);
}

template<typename Interval> inline
typename Interval_traits<Interval>::Subset::result_type 
subset(Interval interval1, Interval interval2) {
    typename Interval_traits<Interval>::Subset subset;
    return subset(interval1, interval2);
}

template<typename Interval> inline
typename Interval_traits<Interval>::Proper_subset::result_type 
proper_subset(Interval interval1, Interval interval2) {
    typename Interval_traits<Interval>::Proper_subset proper_subset;
    return proper_subset(interval1, interval2);
}


// Set operations, functions returing Interval
//the enable_if is need for MSVC as it is not able to eliminate
//the function if Interval_traits<Interval>::Intersection has no result_type
//(like Null_functor)
template<typename Interval> inline 
typename Interval_traits<Interval>::Intersection::result_type
intersection(Interval interval1, Interval interval2, typename boost::enable_if<
             typename Interval_traits<Interval>::Is_interval
             >::type* = NULL
) {
    typename Interval_traits<Interval>::Intersection intersection;
    return intersection(interval1, interval2);
}

template<typename Interval> inline 
typename Interval_traits<Interval>::Hull::result_type
hull(Interval interval1, Interval interval2, typename boost::enable_if<
                                                       boost::is_same<
                                                          typename Interval_traits<Interval>::Is_interval,
                                                          Tag_true > >::type* = NULL) 
{
    typename Interval_traits<Interval>::Hull hull;
    return hull(interval1, interval2);
}



} //namespace CGAL

#endif // CGAL_INTERVAL_TRAITS_H