tipc
A TIP to LLVM compiler
Public Member Functions | Friends | List of all members
UnionFind Class Reference

Specialized implementation of a union-find data structure tailored to work with TipTypes wrapped in shared pointers. More...

#include <UnionFind.h>

Public Member Functions

 UnionFind ()=default
 
 UnionFind (std::vector< std::shared_ptr< TipType >> seed)
 
 ~UnionFind ()=default
 
void add (std::vector< std::shared_ptr< TipType >> seed)
 add additional types to the union find structure More...
 
std::shared_ptr< TipTypefind (std::shared_ptr< TipType > t1)
 
void quick_union (std::shared_ptr< TipType > t1, std::shared_ptr< TipType > t2)
 
bool connected (std::shared_ptr< TipType > t1, std::shared_ptr< TipType > t2)
 

Friends

std::ostream & operator<< (std::ostream &os, const UnionFind &obj)
 

Detailed Description

Specialized implementation of a union-find data structure tailored to work with TipTypes wrapped in shared pointers.

Constructor & Destructor Documentation

◆ UnionFind() [1/2]

UnionFind::UnionFind ( )
default

◆ UnionFind() [2/2]

UnionFind::UnionFind ( std::vector< std::shared_ptr< TipType >>  seed)
explicit

◆ ~UnionFind()

UnionFind::~UnionFind ( )
default

Member Function Documentation

◆ add()

void UnionFind::add ( std::vector< std::shared_ptr< TipType >>  seed)

add additional types to the union find structure

◆ connected()

bool UnionFind::connected ( std::shared_ptr< TipType t1,
std::shared_ptr< TipType t2 
)

◆ find()

std::shared_ptr< TipType > UnionFind::find ( std::shared_ptr< TipType t1)

◆ quick_union()

void UnionFind::quick_union ( std::shared_ptr< TipType t1,
std::shared_ptr< TipType t2 
)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const UnionFind obj 
)
friend

The documentation for this class was generated from the following files: