Class TextCommunitiesReader<U>
java.lang.Object
es.uam.eps.ir.relison.sna.community.io.TextCommunitiesReader<U>
- Type Parameters:
U
- type of the users
- All Implemented Interfaces:
CommunitiesReader<U>
public class TextCommunitiesReader<U> extends java.lang.Object implements CommunitiesReader<U>
Reads a file containing the community structure.
File structure:
node community
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TextCommunitiesReader(java.lang.String delimiter, org.ranksys.formats.parsing.Parser<U> parser)
Constructor. -
Method Summary
Modifier and Type Method Description Communities<U>
read(java.lang.String file)
Reads the community structure from a file.
-
Field Details
-
Constructor Details
-
TextCommunitiesReader
public TextCommunitiesReader(java.lang.String delimiter, org.ranksys.formats.parsing.Parser<U> parser)Constructor.- Parameters:
delimiter
- delimiter separating node identifier and community identifier.parser
- user parser for reading the users.
-
-
Method Details
-
read
Description copied from interface:CommunitiesReader
Reads the community structure from a file.- Specified by:
read
in interfaceCommunitiesReader<U>
- Parameters:
file
- the file containing the community structure.- Returns:
- the community partition.
-