/usr/include/CGAL/Apollonius_site_2.h is in libcgal-dev 4.11-2build1.
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 | // Copyright (c) 2003,2004 INRIA Sophia-Antipolis (France).
// 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
// 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) : Menelaos Karavelas <mkaravel@iacm.forth.gr>
#ifndef CGAL_APOLLONIUS_SITE_2_H
#define CGAL_APOLLONIUS_SITE_2_H
#include <CGAL/license/Apollonius_graph_2.h>
#include <iostream>
#include <CGAL/basic.h>
namespace CGAL {
template < class K >
class Apollonius_site_2
{
public:
typedef K Kernel;
typedef typename K::Point_2 Point_2;
typedef Apollonius_site_2<K> Self;
typedef typename K::FT Weight;
typedef typename K::RT RT;
typedef Weight FT;
public:
Apollonius_site_2(const Point_2& p = Point_2(),
const Weight& w = Weight(0))
: _p(p), _w(w) {}
Apollonius_site_2(const Apollonius_site_2& other)
: _p(other._p), _w(other._w) {}
const Point_2& point() const { return _p; }
const Weight& weight() const { return _w; }
RT x() const { return _p.x(); }
RT y() const { return _p.y(); }
bool operator==(const Apollonius_site_2& other) const
{
return ( _p == other._p && _w == other._w );
}
private:
Point_2 _p;
Weight _w;
};
template <class K>
std::ostream&
operator<<(std::ostream &os, const Apollonius_site_2<K>& wp)
{
return os << wp.point() << " " << wp.weight();
}
template <class K>
std::istream&
operator>>(std::istream& is, Apollonius_site_2<K>& wp)
{
typename Apollonius_site_2<K>::Weight weight (0.);
typename Apollonius_site_2<K>::Point_2 p (0., 0.);
is >> p >> weight;
if(is) {
wp = Apollonius_site_2<K>(p, weight);
}
return is;
}
} //namespace CGAL
#endif // CGAL_APOLLONIUS_SITE_2_H
|