This file is indexed.

/usr/include/gecode/set/ldsb.hh is in libgecode-dev 4.4.0-5.

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
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
 *  Main authors:
 *     Christopher Mears <chris.mears@monash.edu>
 *
 *  Copyright:
 *     Christopher Mears, 2012
 *
 *  Last modified:
 *     $Date: 2013-05-08 13:30:48 +0200 (Wed, 08 May 2013) $ by $Author: schulte $
 *     $Revision: 13622 $
 *
 *  This file is part of Gecode, the generic constraint
 *  development environment:
 *     http://www.gecode.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining
 *  a copy of this software and associated documentation files (the
 *  "Software"), to deal in the Software without restriction, including
 *  without limitation the rights to use, copy, modify, merge, publish,
 *  distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so, subject to
 *  the following conditions:
 *
 *  The above copyright notice and this permission notice shall be
 *  included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#ifndef __GECODE_SET_LDSB_HH__
#define __GECODE_SET_LDSB_HH__

#include <gecode/set.hh>
#include <gecode/int/ldsb.hh>

/**
 * \namespace Gecode::Set::LDSB
 * \brief Symmetry breaking for set variables
 */
namespace Gecode { namespace Set { namespace LDSB {

  using namespace Int::LDSB;
  
  /**
   * \brief Symmetry-breaking brancher with generic view and value
   * selection
   *
   * Implements view-based branching for an array of views (of type
   * \a View) on set variables and value (of type \a Val).
   *
   */
  template<class View, int n, class Val, unsigned int a>
  class LDSBSetBrancher : public LDSBBrancher<View,n,Val,a> {
  public:
    /// Function type for printing variable and value selection
    typedef void (*VarValPrint)(const Space& home, const BrancherHandle& bh,
                                unsigned int b,
                                typename View::VarType x, int i,
                                const Val& m,
                                std::ostream& o);
    /// Position of previous variable that was branched on
    int _prevPos;
    /// Number of non-value symmetries
    int _nNonValueSymmetries;
    /// Number of value symmetries
    int _nValueSymmetries;
    /// Copy of value symmetries from the first node where the current
    /// variable was branched on.
    ValueSymmetryImp<View>** _copiedSyms;
    /// Number of copied symmetries
    int _nCopiedSyms;
    /// Set of values used on left branches for the current variable
    IntSet _leftBranchValues;
    /**
     * \brief Is the state of the brancher "stable"?
     * 
     * The brancher is unstable if we are about to run either "choice"
     * or "commit", but "updatePart1" has not been run.  After
     * "updatePart1" has been run the brancher is stable, until the
     * second part of the update is done (in commit).
     */
    bool _stable;
    
    /// Constructor for cloning \a b
    LDSBSetBrancher(Space& home, bool share, LDSBSetBrancher& b);
    /// Constructor for creation
    LDSBSetBrancher(Home home, 
                    ViewArray<View>& x,
                    ViewSel<View>* vs[n], 
                    ValSelCommitBase<View,Val>* vsc,
                    SymmetryImp<View>** syms, int nsyms,
                    SetBranchFilter bf,
                    VarValPrint vvp);
    /// Return choice
    virtual const Choice* choice(Space& home);
    /// Perform commit for choice \a c and alternative \a b
    virtual ExecStatus commit(Space& home, const Choice& c, unsigned int b);
    /// Perform cloning
    virtual Actor* copy(Space& home, bool share);
    /// Brancher post function
    static BrancherHandle post(Home home, 
                               ViewArray<View>& x,
                               ViewSel<View>* vs[n],
                               ValSelCommitBase<View,Val>* vsc,
                               SymmetryImp<View>** _syms,
                               int _nsyms,
                               SetBranchFilter bf,
                               VarValPrint vvp);

    /**
     * \brief Part one of the update phase
     *
     * If the branching is at a new variable, restore previously
     * copied value symmetries, do bulk update of values used on left
     * branches for the previous variable, and make fresh copy of
     * resulting value symmetries.
     */
    void updatePart1(Space& home, int choicePos);
  };

}}}

namespace Gecode { namespace Int { namespace LDSB {
  template <>
  ArgArray<Literal>
  VariableSequenceSymmetryImp<Set::SetView>
  ::symmetric(Literal l, const ViewArray<Set::SetView>& x) const;
}}}

#include <gecode/set/ldsb/brancher.hpp>

#endif

// STATISTICS: set-branch