This file is indexed.

/usr/include/trilinos/AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.

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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
// @HEADER
// ***********************************************************************
// 
// Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
//                  Copyright (2003) Sandia Corporation
// 
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
// 
// This library is free software; 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 2.1 of the
// License, or (at your option) any later version.
//  
// This library 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
// Lesser General Public License for more details.
//  
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
// 
// ***********************************************************************
// @HEADER

#ifndef TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H
#define TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H

#include <iterator>

#include "AbstractLinAlgPack_Types.hpp"

namespace AbstractLinAlgPack {

/** \brief Templateded iterator for iterating through a set of COO Matix 
  * elements but viewing them in transpose.
  *
  * The iterator type T_Iter must yield a type that conforms to
  * the SparseCOOElementTemplateInterface specification.  In particular
  * it must support itr->value(), itr->row_i(), and itr->col_i().
  *
  * Any category of iterator can be used with this class.  The relavant iterator traits
  * have to be added to the template list since MS VC++ 5.0 does not support
  * partial template specialization and therefore std::iterator_traits<> does
  * not exist.
  *
  * There is a lot of code here but for an iterator object, only the underlying
  * iterator is stored.  Thus, because of inlining accessing a COO matrix through
  * this transposed iterator is just as efficient as assessing it through
  * its non-transposed iterator.  This is important for efficiency reasons.
  *
  * The default assignment operator and copy constructor
  * are allowed.
  *
  * The template arguments are:\begin{itemize}
  *	\item	T_Iter		The type of the iterator that is used to yield COO sparse elements
  *	\item	T_IterCat	The category of iterator (forward, random access etc.)
  *	\item	T_Indice	The type returned by itr->indice()
  *	\item	T_ValRef	The type for the value returned by value().  For example, if T_Ele
  *						is a const type then T_ValRef should be a constant reference and
  *						if it is a non-const type it should be a non-const reference.
  */
template <class T_Iter, class T_IterCat, class T_Indice, class T_ValRef, class T_Diff>
class TransSparseCOOElementViewIter {
public:
  /** @name Public types. */
  //@{

  /** \brief Type for the object that is returned for the transpose sparse
    * element.
    *
    * The default copy constructor is allowed but not the default constructor
    * or assignment operator.
    *
    * Here the type of element may be const or nonconst in accordance with the iterator's
    * type.  The element view (const or nonconst) is just a view to this type.
    */
  template <class TT_Iter, class TT_IterCat, class TT_Indice, class TT_ValRef, class TT_Diff>
  class ElementView {
  public:

    // friends

    friend
    class TransSparseCOOElementViewIter<TT_Iter,TT_IterCat,TT_Indice,TT_ValRef,TT_Diff>;

    // typedefs

    /** \brief . */
    typedef TT_Indice						indice_type;
    /** \brief . */
    typedef TT_ValRef						value_ref_type;

    /** \brief Construct with an iterator to the first element.
      */
    ElementView(const TT_Iter& iter) : encap_iter_(iter)
    {}

    // access functions

    /** \brief . */
    value_ref_type value() const {
      return encap_iter_->value();
    }

    /// returns col_j() of the underlying COO element
    indice_type row_i() const {
      return encap_iter_->col_j();
    }

    /// returns row_i() of the underlying COO element
    indice_type col_j() const {
      return encap_iter_->row_i();
    }

  private:
    TT_Iter	encap_iter_;// iterator that is manipulated by
              // the host iterator

    // not defined and not to be called
    ElementView();
    ElementView& operator=(const ElementView&);
  };

  // Local typedefs

  /** \brief . */
  typedef ElementView<T_Iter,T_IterCat,T_Indice
              ,T_ValRef,T_Diff>				element_view_type;
  /** \brief . */
  typedef T_Iter											encap_iter_type;
  /** \brief . */
  typedef TransSparseCOOElementViewIter<T_Iter,T_IterCat
                ,T_Indice,T_ValRef,T_Diff>	iterator_type;

  // Standard C+ library types for iterators

  /** \brief . */
  typedef	T_IterCat										iterator_category;
  /** \brief . */
  typedef	element_view_type								value_type;
  /** \brief . */
  typedef element_view_type&								reference_type;
  /** \brief . */
  typedef element_view_type*								pointer_type;
  /** \brief . */
  typedef	T_Diff											difference_type;
  /** \brief . */
  typedef	size_t											distance_type;

  //	end Public Types
  //@}

  /** @name Constructors. */
  //@{

  /** \brief Construct with the iterator of COO elements to transpose.
    *
    * Note that this constructor also allows an implicit conversion
    * from the nontransposed iterator to the transposed iterator.
    * This may not be desireable.
    */
  TransSparseCOOElementViewIter(T_Iter itr) : element_view_(itr)
  {}

  //@}

  /** @name Iterator control functions. */
  //@{

  // Access
  reference_type		operator*()	const {
    return const_cast<element_view_type&>(element_view_);
  }
  pointer_type		operator->() const {
    return const_cast<element_view_type*>(&element_view_);
  }
  value_type			operator[](distance_type n)	const {
    return element_view_type(element_view_.encap_iter_ + n);
  }
  // Incrementation
  // ++itr
  iterator_type&		operator++() {
    element_view_.encap_iter_++;
    return *this;
  }
  // itr++
  const iterator_type	operator++(int) {
    iterator_type tmp = *this;
    ++*this;
    return tmp;
  }
  // --itr
  iterator_type&		operator--() {
    element_view_.encap_iter_--;
    return *this;
  }
  // itr--
  const iterator_type	operator--(int) {
    iterator_type tmp = *this;
    --*this;
    return tmp;
  }
  // itr + n 
  iterator_type			operator+(distance_type n) {
    return iterator_type(element_view_.encap_iter_ + n);
  }
  const iterator_type		operator+(distance_type n) const {
    return iterator_type(element_view_.encap_iter_ + n);
  }
  // itr += n
  iterator_type&		operator+=(distance_type n) {
    element_view_.encap_iter_ += n;
    return *this;
  }
  // itr - n
  iterator_type			operator-(distance_type n) {
    return iterator_type(element_view_.encap_iter_ - n);
  }
  const iterator_type	operator-(distance_type n) const {
    return iterator_type(element_view_.encap_iter_ - n);
  }
  // itr -= n
  iterator_type&		operator-=(distance_type n) {
    element_view_.encap_iter_ -= n;
    return *this;
  }
  // distance = itr1 - itr2 (distance between elements)
  distance_type		operator-(const iterator_type& itr) const	{
    return element_view_.encap_iter_ - itr.element_view_.encap_iter_;
  }

  //@}

  /** @name Comparison Operators.
   */
  //@{

  // <
  bool operator<(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ < itr.element_view_.encap_iter_;
  }
  // <=
  bool operator<=(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ <= itr.element_view_.encap_iter_;
  }
  // >
  bool operator>(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ > itr.element_view_.encap_iter_;
  }
  // >=
  bool operator>=(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ >= itr.element_view_.encap_iter_;
  }
  // ==
  bool operator==(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ == itr.element_view_.encap_iter_;
  }
  // !=
  bool operator!=(const iterator_type& itr)
  {	
    return element_view_.encap_iter_ != itr.element_view_.encap_iter_;
  }

  //@}

private:
  element_view_type	element_view_;
  
  // not defined and not to be called
  TransSparseCOOElementViewIter();

};	// end class TransSparseCOOElementViewIter

// ///////////////////////////////////////////////////////////////////////////////////////
// Nonmember functions

// Allow distance_type as lhs argument in n + itr

//template <class Iter, class Cat, class Indice, class ValRef, class Diff>
//inline TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff>
//operator+(Diff n, TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff> itr)
//{
//	return itr + n;
//}

template <class Iter, class Cat, class Indice, class ValRef, class Diff>
inline TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff>
operator+(Diff n, const TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff> itr)
{
  return itr + n;
}

} // end namespace AbstractLinAlgPack 

#endif // TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H