nick when i create does functions there is conflict because we are use a pointer with a reference
Point* DisjSets::findPathcompression( Point & a )
{
if( a.parent == NULL)
...
Type: Posts; User: roberto81
nick when i create does functions there is conflict because we are use a pointer with a reference
Point* DisjSets::findPathcompression( Point & a )
{
if( a.parent == NULL)
...
How would i do union by size with parent
i would have to do parent->point.value = negative what ever right
thanks i will check that out and talk to you tommorrow thanks
HOW WOULD I IMPLEMENT IT HERE
class Point
{
public:
Point(): x(0),y(0),value(-1),index(0) PARENT(NULL){}
Point(int xCoordinate, // x coordinate in (x,y)
int yCoordinate // y coordinate in...
CAN YOU EXPLAIN THIS AND EXACTLY WHAT ITS GOING ON IN THE FUNCTION. WHAT IS PARENT AND WHAT TYPE IS IT
i would make an Point* field parent then all that would
be necessary I think is
...
Off the top of your head, do you know how to implement a findpathcompression on a object instead of intergers. im have a problem
this is mine;
class Point
{
public:
Point():...
Nick i want tosay thank u for helping i will look over what u said and try to understand it
i know its suppose to be like that but im trying to think of a way to do all possible combinations in less then Order N squared.
no its suppose to be the distance between point 1 and point 2, that distance has to be less then a predefined number
A[x / d][y / d] what is d here
i dont understand ((x,y) is a point on the euclidean plane)
(2,3) and (2,4) are 1 distance apart from each other by using the distance formula of two points. I dont follow the rectancle thing.
no i have multiple points (2,30),(4,67),(2,5) .. etc. i have to make a disjoined set and then union two points that have a distance between less than a predefined number. and i have to do it in nlogn...
I have a question, i have to create a disjointed set from a thousand points (x,y) and the equivalence relation is the distance between two points is less that a predefined number. I am a little lost...
I have a question, i have to create a disjointed set from a thousand points (x,y) and the equivalence relation is the distance between two points is less that a predefined number. I am a little lost...