Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Analysis.AlgorithmBehavior/qhull-2012.1/src/libqhullcpp/RboxPoints.h @ 10207

Last change on this file since 10207 was 10207, checked in by ascheibe, 11 years ago

#1886 added a unit test for volume calculation and the qhull library

File size: 2.1 KB
Line 
1/****************************************************************************
2**
3** Copyright (c) 2008-2012 C.B. Barber. All rights reserved.
4** $Id: //main/2011/qhull/src/libqhullcpp/RboxPoints.h#6 $$Change: 1464 $
5** $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
6**
7****************************************************************************/
8
9#ifndef RBOXPOINTS_H
10#define RBOXPOINTS_H
11
12#include "QhullPoint.h"
13#include "PointCoordinates.h"
14extern "C" {
15#include "libqhull/libqhull.h"
16}
17
18#include <stdarg.h>
19#include <string>
20#include <vector>
21#include <istream>
22#include <ostream>
23#include <sstream>
24
25namespace orgQhull {
26
27#//Types
28    //! RboxPoints -- generate random PointCoordinates for Qhull
29    class RboxPoints;
30
31    class RboxPoints : public PointCoordinates {
32
33private:
34#//Fields and friends
35    int                 rbox_new_count;     //! Number of points for PointCoordinates
36    int                 rbox_status;    //! error status from rboxpoints.  qh_ERRnone if none.
37    std::string         rbox_message;   //! stderr from rboxpoints
38
39    friend void ::qh_fprintf_rbox(FILE *fp, int msgcode, const char *fmt, ... );
40
41public:
42#//Construct
43                        RboxPoints();
44    explicit            RboxPoints(const char *rboxCommand);
45                        RboxPoints(const RboxPoints &other);
46                        RboxPoints &operator=(const RboxPoints &other);
47                       ~RboxPoints();
48
49public:
50#//GetSet
51    void                clearRboxMessage();
52    int                 newCount() const { return rbox_new_count; }
53    std::string         rboxMessage() const;
54    int                 rboxStatus() const;
55    bool                hasRboxMessage() const;
56    void                setNewCount(int pointCount) { QHULL_ASSERT(pointCount>=0); rbox_new_count= pointCount; }
57
58#//Modify
59    void                appendPoints(const char* rboxCommand);
60    using               PointCoordinates::appendPoints;
61    void                reservePoints() { reserveCoordinates((count()+newCount())*dimension()); }
62};//class RboxPoints
63
64}//namespace orgQhull
65
66#endif // RBOXPOINTS_H
Note: See TracBrowser for help on using the repository browser.