#include <Connectivity.h>

Go to the source code of this file.
Defines | |
| #define | SIZE_BUFFER 2048 |
| #define | SIZE_BUFFER 2048 |
| #define | SIZE_BUFFER 2048 |
Functions | |
| Connectivity | operator+ (const Connectivity &c1, const Connectivity &c2) |
| Connectivity | operator+ (const Connectivity &_c, const std::vector< int > &v) |
| Connectivity | operator+ (const std::vector< int > &v, const Connectivity &_c) |
| Connectivity | operator- (const Connectivity &c1, const Connectivity &c2) |
| Connectivity | operator- (const Connectivity &c1, const std::vector< int > &c2) |
| bool | operator== (const Connectivity &c1, const Connectivity &c2) |
| bool | operator!= (const Connectivity &c1, const Connectivity &c2) |
| ostream & | operator<< (ostream &flux, const Connectivity &c) |
| #define SIZE_BUFFER 2048 |
| #define SIZE_BUFFER 2048 |
| #define SIZE_BUFFER 2048 |
| bool operator!= | ( | const Connectivity & | c1, | |
| const Connectivity & | c2 | |||
| ) |
| Connectivity operator+ | ( | const std::vector< int > & | v, | |
| const Connectivity & | _c | |||
| ) |
Definition at line 691 of file Connectivity.cpp.
00692 { 00693 Connectivity c; 00694 c = _c+v; 00695 return c; 00696 }
| Connectivity operator+ | ( | const Connectivity & | _c, | |
| const std::vector< int > & | v | |||
| ) |
Definition at line 673 of file Connectivity.cpp.
References Connectivity::add_polygon(), Connectivity::build_all_index(), Connectivity::get_index_of_polygon(), and Connectivity::polygon_number().
00674 { 00675 Connectivity c; 00676 00677 int N_polygon=0; 00678 int k_polygon=0; 00679 00680 N_polygon=_c.polygon_number(); 00681 for(k_polygon=0;k_polygon<N_polygon;k_polygon++) 00682 c.add_polygon(_c.get_index_of_polygon(k_polygon)); 00683 00684 c.add_polygon(v); 00685 c.build_all_index(); 00686 00687 return c; 00688 }

| Connectivity operator+ | ( | const Connectivity & | c1, | |
| const Connectivity & | c2 | |||
| ) |
Just add, assume there is no duplicate
Definition at line 654 of file Connectivity.cpp.
References Connectivity::add_polygon(), Connectivity::build_all_index(), Connectivity::get_index_of_polygon(), and Connectivity::polygon_number().
00655 { 00656 Connectivity c; 00657 int N_polygon=0; 00658 int k_polygon=0; 00659 00660 N_polygon=c1.polygon_number(); 00661 for(k_polygon=0;k_polygon<N_polygon;k_polygon++) 00662 c.add_polygon(c1.get_index_of_polygon(k_polygon)); 00663 00664 N_polygon=c2.polygon_number(); 00665 for(k_polygon=0;k_polygon<N_polygon;k_polygon++) 00666 c.add_polygon(c2.get_index_of_polygon(k_polygon)); 00667 00668 c.build_all_index(); 00669 00670 return c; 00671 }

| Connectivity operator- | ( | const Connectivity & | c1, | |
| const std::vector< int > & | c2 | |||
| ) |
Definition at line 712 of file Connectivity.cpp.
References Connectivity::delete_given_polygon().
00713 { 00714 Connectivity c=c1; 00715 c.delete_given_polygon(c2); 00716 return c; 00717 }

| Connectivity operator- | ( | const Connectivity & | c1, | |
| const Connectivity & | c2 | |||
| ) |
Definition at line 699 of file Connectivity.cpp.
References Connectivity::delete_given_polygon(), Connectivity::get_index_of_polygon(), and Connectivity::polygon_number().
00700 { 00701 Connectivity c; 00702 c=c1; 00703 00704 int k=0; 00705 int N_polygon=c2.polygon_number(); 00706 for(k=0;k<N_polygon;k++) 00707 c.delete_given_polygon(c2.get_index_of_polygon(k)); 00708 00709 return c; 00710 }

| ostream& operator<< | ( | ostream & | flux, | |
| const Connectivity & | c | |||
| ) |
Definition at line 745 of file Connectivity.cpp.
References Connectivity::polygon_number(), and Connectivity::polygon_size().
00746 { 00747 int k_polygon=0,N_polygon=c.polygon_number(); 00748 int k_vertex=0,N_vertex=0; 00749 for(k_polygon=0;k_polygon<N_polygon;k_polygon++) 00750 { 00751 N_vertex=c.polygon_size(k_polygon); 00752 flux<<N_vertex<<" ["; 00753 for(k_vertex=0;k_vertex<N_vertex-1;k_vertex++) 00754 cout<<c(k_polygon,k_vertex)<<","; 00755 cout<<c(k_polygon,N_vertex-1)<<"]"<<endl; 00756 } 00757 00758 return flux; 00759 }

| bool operator== | ( | const Connectivity & | c1, | |
| const Connectivity & | c2 | |||
| ) |
Definition at line 720 of file Connectivity.cpp.
References Connectivity::polygon_number(), and Connectivity::polygon_size().
00721 { 00722 00723 //must have same dimension first 00724 if(c1.polygon_number()!=c2.polygon_number()) 00725 return 0; 00726 00727 int k_polygon=0; 00728 int N_polygon=c1.polygon_number(); 00729 int k_vertex=0,N_vertex=0; 00730 for(k_polygon=0;k_polygon<N_polygon;k_polygon++) 00731 { 00732 if(c1.polygon_size(k_polygon)!=c2.polygon_size(k_polygon)) 00733 return 0; 00734 00735 N_vertex=c1.polygon_size(k_polygon); 00736 for(k_vertex=0;k_vertex<N_vertex;k_vertex++) 00737 if(c1(k_polygon,k_vertex)!=c2(k_polygon,k_vertex)) 00738 return 0; 00739 } 00740 return 1; 00741 }

1.5.6