Class TextCommunitiesWriter<U>
java.lang.Object
es.uam.eps.ir.relison.sna.community.io.TextCommunitiesWriter<U>
- Type Parameters:
U- type of the users.
- All Implemented Interfaces:
CommunitiesWriter<U>
public class TextCommunitiesWriter<U> extends java.lang.Object implements CommunitiesWriter<U>
Writes a community file.
File structure:
node community
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringdelimiterDelimiter that separates the node and community ids. -
Constructor Summary
Constructors Constructor Description TextCommunitiesWriter(java.lang.String delimiter)Constructor. -
Method Summary
Modifier and Type Method Description booleanwrite(Communities<U> comm, java.lang.String file)Writes the community structure into a file.
-
Field Details
-
delimiter
private final java.lang.String delimiterDelimiter that separates the node and community ids.
-
-
Constructor Details
-
TextCommunitiesWriter
public TextCommunitiesWriter(java.lang.String delimiter)Constructor.- Parameters:
delimiter- Delimiter that separates the node and community ids.
-
-
Method Details
-
write
Description copied from interface:CommunitiesWriterWrites the community structure into a file.- Specified by:
writein interfaceCommunitiesWriter<U>- Parameters:
comm- community partition.file- route of the file.- Returns:
- true if everything goes OK, false otherwise.
-