Esempio n. 1
0
 const Cluster operator-(const Cluster &c, const Point &p)
 {
     Cluster subtracted;
     subtracted.__cpy(c.__points);
     subtracted.remove(p);
     return subtracted;
 }
Esempio n. 2
0
// Friends: Arithmetic (Cluster and Point)
    const Cluster operator+(const Cluster &c, const Point &p)
    {
        Cluster added;
        added.__cpy(c.__points);
        added.add(p);
        return added;
    }
Esempio n. 3
0
// Friends: Arithmetic (two Clusters)
    const Cluster operator+(const Cluster &one, const Cluster &two) // union
    {
        Cluster allTogether;
        allTogether.__cpy(one.__points);
        int size = two.getSize();
        // This isn't going to work, it will pass the first point and nothing more.
        allTogether.add(two.__points->point);

    }