NAME
Jubatus::Common::Datum - Common data structure for each Perl client modules of Jubatus.
SYNOPSIS
use Jubatus::Common::Datum;
# or use Jubatus
#
# Jubatus.pm have the interfaces to use Jubatus::Common::Datum .
DESCRIPTION
This module provide the constructors and the methods to use interface of each Perl client modules of Jubatus.
METHODS
Jubatus::Common::Datum will provide many packages and constructors, methods. You can use these with Jubatus or Jubatus::***::Clients.
Packages
Jubatus::Common::Datum
If you want to use this package, all one need to do is write "use Jubatus::Common::Datum;" or "use Jubatus;".
Constructors
Jubatus::Common::Datum->new($string_values, $num_values);
Input:
- $string_values is a hash reference.
Each entries of this hash reference are String key and String value.
- $num_values is a hash reference.
Each entries of this hash reference are String key and Float value.
Output:
- Jubatus::Common::Datum object.
This object have two fields.
'string_values' field locate the array reference which was inputed as
$string_values in constructor.
'num_values' field locate the array reference which was inputed as
$num_values in constructor.
Functions
to_msgpack->()
Input:
- None
Output:
- A array reference
This array reference locate $string_values and $num_values which are given
in constructor.
This array reference certainly locate two array references. First
reference are allowed to locate many array references. Each of located
arrry references should have two string value which are called "key"
and "value". Second reference are allowed to locate many array references.
Each of located arrry references should have two values. First string
value which are called "key" and second float value which are called
"value".
from_msgpack->($return_value_from_msgpack)
Input:
- $return_value_from_msgpack is a array reference.
This array reference certainly locate two array references. First
reference are allowed to locate many array references. Each of located
arrry references should have two string value which are called "key"
and "value". Second reference are allowed to locate many array references.
Each of located arrry references should have two values. First string
value which are called "key" and second float value which are called
"value".
Output:
- Jubatus::Common::Datum object.
hash_ref_to_array_ref->($hash_ref)
Input:
- $hash_ref is a hash reference.
Each entries of this hash reference are String key and (String|Float)
value.
Output:
- An array reference of the array references
This arrry references is allowed to locate many array references. Each
of these array references should have two values which are called "key"
and "value". The data type of key should be String. The data type
of value should be String or Float.
SEE ALSO
http://jubat.us/ https://github.com/jubatus
AnyEvent::MPRPC AnyEvent::MPRPC::Client http://msgpack.org/ http://wiki.msgpack.org/display/MSGPACK/RPC+specification
https://github.com/overlast/p5-Jubatus
LICENSE
Copyright (C) 2013 by Toshinori Sato (@overlast).
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The licence of Jubatus is LGPL 2.1.
Jubatus: Online machine learning framework for distributed environment
Copyright (C) 2011,2012 Preferred Infrastructure and Nippon Telegraph and Telephone Corporation.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
However Jubatus.pm and Jubatus::*.pm is the pure Perl modules. Therefor the licence of Jubatus.pm and Jubatus::*.pm is the Perl's licence.
AUTHOR
Toshinori Sato (@overlast) <overlasting@gmail.com>