The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DiaColloDB::Profile::MultiDiff - diachronic collocation db, (co-)frequency profile diffs, by date

ALIASES

DiaColloDB::Profile::MultiDiff
DiaColloDB::Profile::Multi::Diff
DiaColloDB::Profile::Diff::Multi

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DiaColloDB::Profile::MultiDiff;
 
 ##========================================================================
 ## Constructors etc.
 
 $mpd = CLASS_OR_OBJECT->new(%args);
 
 ##========================================================================
 ## I/O: JSON
 
 $obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts);
 
 ##========================================================================
 ## I/O: Text
 
 undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles);
 
 ##========================================================================
 ## I/O: HTML
 
 $bool = $mp->saveHtmlFile($filename_or_handle, %opts);
 
 ##========================================================================
 ## Compilation
 
 $mpd = $mpd->populate($mp1,$mp2);
 $class = $CLASS_OR_OBJECT->pclass();
 $mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);
 

DESCRIPTION

DiaColloDB::Profile::MultiDiff is the top-level class for representing diachronic collocate frequency comparison-profile data over multiple date-slices as arising from the comparison of two DiaColloDB::Profile::Multi objects. The API closely mirrors that of the DiaColloDB::Profile::Diff class used to represent slice-wise sub-profiles.

Globals & Constants

Variable: @ISA

DiaColloDB::Profile::MultiDiff inherits from DiaColloDB::Profile::Multi.

Constructors etc.

new
 $mpd = CLASS_OR_OBJECT->new(%args);
 $mpd = CLASS_OR_OBJECT->new($mp1,$mp2,%args);

%args, object structure:

 profiles => \@profiles,   ##-- ($profile, ...) : sub-diffs, with {label} key
 titles   => \@titles,     ##-- item group titles (default:undef: unknown)
 qinfo    => \%qinfo,      ##-- query info (optional; keys prefixed with 'a' or 'b'): see DiaColloDB::Profile::Multi
 populate => $bool,        ##-- auto-populate() if $mp1 and $mp2 are specified? (default=1)

I/O: JSON

loadJsonData
 $obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts);

guts for loadJsonString(), loadJsonFile()

I/O: Text

saveTextHeader
 undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles);

print column title header for text output.

I/O: HTML

saveHtmlFile
 $bool = $mp->saveHtmlFile($filename_or_handle, %opts);

Save flat HTML table data with rows of the form

 SCOREa SCOREb DIFF LABEL ITEM2...

If verbose option is specified and true, saved table has the form

 Na Nb F1a F1b F2a F2b F12a F12b SCOREa SCOREb DIFF PREFIX? ITEM2...

Options %opts:

 table   => $bool,     ##-- include <table>..</table> ? (default=1)
 body    => $bool,     ##-- include <html><body>...</html></body> ? (default=1)
 qinfo   => $varname,  ##-- include <script> for qinfo data? (default='qinfo')
 verbose => $bool,     ##-- include verbose output? (default=0)
 header  => $bool,     ##-- include header-row? (default=1)
 format  => $fmt,      ##-- printf score formatting (default="%.2f")

Compilation

populate
 $mpd = $mpd->populate($mp1,$mp2);

populates multi-diff by subtracting $mp2 sub-profile scores from $mp1; uses $mpd->align() to align sub-profiles.

pclass
 $class = $CLASS_OR_OBJECT->pclass();

subprofile class for psum().

trimPairs
 $mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);

%opts: as for DiaColloDB::Profile::Multi::trim(), including 'global' option

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2015-2016 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

DiaColloDB::Profile::Diff(3pm), DiaColloDB::Profile::Multi(3pm), DiaColloDB(3pm), perl(1), ...