public class SimpleFactorizationFormat extends Object implements FactorizationFormat
Modifier and Type | Method and Description |
---|---|
static SimpleFactorizationFormat |
get()
Returns an instance of this class.
|
<U,I> Factorization<U,I> |
load(InputStream in,
FastUserIndex<U> uIndex,
FastItemIndex<I> iIndex)
Loads a matrix from a compressed input stream.
|
<U,I> void |
save(Factorization<U,I> factorization,
OutputStream out)
Saves this matrix factorization to a compressed output stream.
|
public static SimpleFactorizationFormat get()
public <U,I> void save(Factorization<U,I> factorization, OutputStream out) throws IOException
FactorizationFormat
save
in interface FactorizationFormat
U
- type of the usersI
- type of the itemsfactorization
- factorizationout
- output streamIOException
- when IO errorpublic <U,I> Factorization<U,I> load(InputStream in, FastUserIndex<U> uIndex, FastItemIndex<I> iIndex) throws IOException
FactorizationFormat
load
in interface FactorizationFormat
U
- type of the usersI
- type of the itemsin
- input streamuIndex
- fast user indexiIndex
- fast item indexIOException
- when IO errorCopyright © 2016. All rights reserved.