lsst.afw  15.0-25-gacd707fca
CoordinateExpr.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2008, 2009, 2010 LSST Corporation.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <http://www.lsstcorp.org/LegalNotices/>.
21  */
22 
24 #include "lsst/afw/geom/Point.h"
25 #include "lsst/afw/geom/Extent.h"
26 
27 namespace lsst {
28 namespace afw {
29 namespace geom {
30 
31 template <int N>
33  CoordinateExpr r(*this);
34  for (int n = 0; n < N; ++n) {
35  if (!other[n]) r[n] = false;
36  }
37  return r;
38 }
39 
40 template <int N>
42  CoordinateExpr r(*this);
43  for (int n = 0; n < N; ++n) {
44  if (other[n]) r[n] = true;
45  }
46  return r;
47 }
48 
49 template <int N>
52  for (int n = 0; n < N; ++n) {
53  if (!this->operator[](n)) r[n] = true;
54  }
55  return r;
56 }
57 
58 template class CoordinateExpr<2>;
59 template class CoordinateExpr<3>;
60 }
61 }
62 } // end lsst::afw::geom
A boolean coordinate.
ItemVariant const * other
Definition: Schema.cc:55
A base class for image defects.
CoordinateExpr or_(CoordinateExpr const &rhs) const
CoordinateExpr not_() const
CoordinateExpr and_(CoordinateExpr const &rhs) const