1 /****************************************************************************
2 **
3 ** Copyright (c) 2009-2019 C.B. Barber. All rights reserved.
4 ** $Id: //main/2019/qhull/src/libqhullcpp/QhullPointSet.cpp#1 $$Change: 2661 $
5 ** $DateTime: 2019/05/24 20:09:58 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #include "libqhullcpp/QhullPointSet.h"
10 
11 #include <iostream>
12 #include <algorithm>
13 
14 #ifdef _MSC_VER  // Microsoft Visual C++ -- warning level 4
15 #endif
16 
17 namespace orgQhull {
18 
19 // Implemented via QhullSet.h
20 
21 }//namespace orgQhull
22 
23 #//!\name Global functions
24 
25 using std::endl;
26 using std::ostream;
27 using orgQhull::QhullPoint;
28 using orgQhull::QhullPointSet;
29 using orgQhull::QhullPointSetIterator;
30 
31 ostream &
operator <<(ostream & os,const QhullPointSet::PrintIdentifiers & pr)32 operator<<(ostream &os, const QhullPointSet::PrintIdentifiers &pr)
33 {
34     os << pr.print_message;
35     const QhullPointSet s= *pr.point_set;
36     QhullPointSetIterator i(s);
37     while(i.hasNext()){
38         if(i.hasPrevious()){
39             os << " ";
40         }
41         const QhullPoint point= i.next();
42         countT id= point.id();
43         os << "p" << id;
44 
45     }
46     os << endl;
47     return os;
48 }//PrintIdentifiers
49 
50 ostream &
operator <<(ostream & os,const QhullPointSet::PrintPointSet & pr)51 operator<<(ostream &os, const QhullPointSet::PrintPointSet &pr)
52 {
53     os << pr.print_message;
54     const QhullPointSet s= *pr.point_set;
55     for(QhullPointSet::const_iterator i=s.begin(); i != s.end(); ++i){
56         const QhullPoint point= *i;
57         os << point;
58     }
59     return os;
60 }//printPointSet
61 
62 
63