Interface LinkPredictionFormat<U>
- Type Parameters:
U
- type of the users.
- All Known Implementing Classes:
SimpleLinkPredictionFormat
,TuplesLinkPredictionFormat
public interface LinkPredictionFormat<U>
Recommendation writers and readers with a common format.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LinkPredictionFormat.Reader<U>
Recommendation reader.static interface
LinkPredictionFormat.Writer<U>
Link prediction writer. -
Method Summary
Modifier and Type Method Description default LinkPredictionFormat.Reader<U>
getReader(java.io.File file)
Gets a reader for a file.LinkPredictionFormat.Reader<U>
getReader(java.io.InputStream in)
Gets a reader for an input stream.default LinkPredictionFormat.Reader<U>
getReader(java.lang.String path)
Gets a reader for a file path.default LinkPredictionFormat.Reader<U>
getReader(java.nio.file.Path path)
Gets a reader for a file path.default LinkPredictionFormat.Writer<U>
getWriter(java.io.File file)
Gets a writer for a file.LinkPredictionFormat.Writer<U>
getWriter(java.io.OutputStream out)
Gets a writer for an output stream.default LinkPredictionFormat.Writer<U>
getWriter(java.lang.String path)
Gets a writer for a file path.default LinkPredictionFormat.Writer<U>
getWriter(java.nio.file.Path path)
Gets a writer for a file path.
-
Method Details
-
getWriter
default LinkPredictionFormat.Writer<U> getWriter(java.nio.file.Path path) throws java.io.IOExceptionGets a writer for a file path.- Parameters:
path
- file path- Returns:
- a link prediction writer
- Throws:
java.io.IOException
- if path does not exist or IO error
-
getWriter
Gets a writer for a file path.- Parameters:
path
- file path- Returns:
- a link prediction writer
- Throws:
java.io.IOException
- if path does not exist or IO error
-
getWriter
Gets a writer for a file.- Parameters:
file
- file- Returns:
- a link prediction writer
- Throws:
java.io.IOException
- if path does not exist or IO error
-
getWriter
Gets a writer for an output stream.- Parameters:
out
- output stream- Returns:
- a link prediction writer
- Throws:
java.io.IOException
- if path does not exist or IO error
-
getReader
default LinkPredictionFormat.Reader<U> getReader(java.nio.file.Path path) throws java.io.IOExceptionGets a reader for a file path.- Parameters:
path
- file path- Returns:
- a link prediction reader
- Throws:
java.io.IOException
- when IO error
-
getReader
Gets a reader for a file path.- Parameters:
path
- file path- Returns:
- a link prediction reader
- Throws:
java.io.IOException
- when IO error
-
getReader
Gets a reader for a file.- Parameters:
file
- file- Returns:
- a link prediction reader
- Throws:
java.io.IOException
- when IO error
-
getReader
Gets a reader for an input stream.- Parameters:
in
- input stream- Returns:
- a recommendation reader
- Throws:
java.io.IOException
- when IO error
-