org.apache.mahout.math
Class JsonMatrixAdapter
java.lang.Object
org.apache.mahout.math.JsonMatrixAdapter
- All Implemented Interfaces:
- com.google.gson.JsonDeserializer<Matrix>, com.google.gson.JsonSerializer<Matrix>
public class JsonMatrixAdapter
- extends java.lang.Object
- implements com.google.gson.JsonSerializer<Matrix>, com.google.gson.JsonDeserializer<Matrix>
Field Summary |
static java.lang.String |
CLASS
|
static java.lang.String |
MATRIX
|
Method Summary |
Matrix |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
|
com.google.gson.JsonElement |
serialize(Matrix src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS
public static final java.lang.String CLASS
- See Also:
- Constant Field Values
MATRIX
public static final java.lang.String MATRIX
- See Also:
- Constant Field Values
JsonMatrixAdapter
public JsonMatrixAdapter()
serialize
public com.google.gson.JsonElement serialize(Matrix src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interface com.google.gson.JsonSerializer<Matrix>
deserialize
public Matrix deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
throws com.google.gson.JsonParseException
- Specified by:
deserialize
in interface com.google.gson.JsonDeserializer<Matrix>
- Throws:
com.google.gson.JsonParseException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.