~ubuntu-branches/debian/stretch/cgal/stretch

« back to all changes in this revision

Viewing changes to include/CGAL/RS/algebraic_1_operators.h

  • Committer: Package Import Robot
  • Author(s): Joachim Reichel
  • Date: 2014-04-05 10:56:43 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140405105643-jgnrpu2thtx23zfs
Tags: 4.4-1
* New upstream release.
* Remove patches do-not-link-example-with-qt4-support-library.patch and
  fix_jet_fitting_3.patch (applied upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright (c) 2006-2008 Inria Lorraine (France). All rights reserved.
2
 
//
3
 
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
4
 
// modify it under the terms of the GNU Lesser General Public License as
5
 
// published by the Free Software Foundation; either version 3 of the License,
6
 
// or (at your option) any later version.
7
 
//
8
 
// Licensees holding a valid commercial license may use this file in
9
 
// accordance with the commercial license agreement provided with the software.
10
 
//
11
 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12
 
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13
 
//
14
 
// $URL$
15
 
// $Id$
16
 
//
17
 
// Author: Luis Peñaranda <luis.penaranda@gmx.com>
18
 
 
19
 
#ifndef CGAL_RS_ALGEBRAIC_1_OPERATORS_H
20
 
#define CGAL_RS_ALGEBRAIC_1_OPERATORS_H
21
 
 
22
 
namespace CGAL{
23
 
 
24
 
inline
25
 
Algebraic_1 Algebraic_1::operator+()const{
26
 
        return *this;
27
 
}
28
 
 
29
 
inline
30
 
Algebraic_1 Algebraic_1::operator-()const{
31
 
        mpfi_t inv;
32
 
        mpfi_init2(inv,mpfi_get_prec(mpfi()));
33
 
        mpfi_neg(inv,mpfi());
34
 
        Algebraic_1 *inverse=new Algebraic_1(inv,
35
 
                                             pol().minusx(),
36
 
                                             nr(),
37
 
                                             mult(),
38
 
                                             -lefteval());
39
 
        return *inverse;
40
 
}
41
 
 
42
 
} // namespace CGAL
43
 
 
44
 
#endif  // CGAL_RS_ALGEBRAIC_1_OPERATORS_H