Пример #1
0
ostream &
operator<<(ostream &os, const QhullPointSet::PrintPointSet &pr)
{
    os << pr.print_message;
    const QhullPointSet s= *pr.point_set;
    for(QhullPointSet::const_iterator i=s.begin(); i != s.end(); ++i){
        const QhullPoint point= *i;
        os << point;
    }
    return os;
}//printPointSet
Пример #2
0
bool QhullPointSet::
operator==(const QhullPointSet &o) const
{
    if(dimension()!=o.dimension() || count()!=o.count()){
        return false;
    }
    QhullPointSetIterator i(*this);
    QhullPointSetIterator j(o);
    while(i.hasNext()){
        if(i.next()!=j.next()){
            return false;
        }
    }
    return true;
}//operator==
Пример #3
0
ostream &
operator<<(ostream &os, const QhullPointSet::PrintIdentifiers &pr)
{
    const QhullPointSet s= *pr.point_set;
    if (pr.print_message) {
        os << pr.print_message;
    }
    for(QhullPointSet::const_iterator i=s.begin(); i != s.end(); ++i){
        if(i!=s.begin()){
            os << " ";
        }
        const QhullPoint point= *i;
        int id= point.id(pr.run_id);
        os << "p" << id;
    }
    os << endl;
    return os;
}//PrintIdentifiers