Community Pruning
Post processing community structures.
 All Classes Files Functions
Functions | Variables
OrderTrim.cc File Reference
#include "Toolbox/Util/IOX.h"
#include "Toolbox/Util/Parameters.h"
#include "Toolbox/Util/StringEx.h"
#include "Toolbox/Util/STX.h"
#include "Structure/Density.h"
#include "Structure/Network.h"

Functions

double c_size (std::tr1::shared_ptr< Community > C, std::tr1::shared_ptr< Parameters > P)
 
double c_dens (std::tr1::shared_ptr< Community > C, std::tr1::shared_ptr< Parameters > P)
 
int main (int argc, char **argv)
 

Variables

char DTYPE = 'c'
 

Detailed Description

Called Order Trim because, originally, the idea was to sort the communities and take the top 10% or or bottom 10% of communities based on some metric. As it turns out, this was changed to get all communities whose metric falls in a range, so there is no actual ordering going on here.

Community text file: One community per line, members separated by some delimiter. Same format of text file, with communities whose metric fell outside the given range missing.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
James Thompson Copyright 2014 James Thompson

Function Documentation

double c_dens ( std::tr1::shared_ptr< Community >  C,
std::tr1::shared_ptr< Parameters >  P 
)

Retrieves the density of the given community.

Parameters
std::tr1::shared_ptr< Community > C Community of interest
std::tr1::shared_ptr< Parameters > P Extra parameters that might be necessary ( lambda value for density )
double c_size ( std::tr1::shared_ptr< Community >  C,
std::tr1::shared_ptr< Parameters >  P 
)

Retrieves the size of the given community.

Parameters
std::tr1::shared_ptr< Community > C Community of interest
std::tr1::shared_ptr< Parameters > P Extra parameters that might be necessary ( not needed for this particular function )
int main ( int  argc,
char **  argv 
)

Entry point for the program