AI::CBR::Case::Compound - compound case definition and representation
Define and initialise a compound (or object-oriented) case. This is a case consisting of multiple object definitions related in some way. In a productive system, you will want to encapsulate this.
use AI::CBR::Case::Compound; use AI::CBR::Sim qw(sim_eq sim_dist); # assume we sell travels with flight and hotel # shortcut one-time generated case my $case = AI::CBR::Case::Compound->new( # flight object { flight_start => { value => 'FRA', sim => \&sim_eq }, flight_target => { value => 'LIS', sim => \&sim_eq }, price => { value => 300, sim => \&sim_dist, param => 200 }, }, # hotel object { stars => { value => 3, sim => \&sim_dist, param => 2 }, rate => { value => 60, sim => \&sim_dist, param => 200 }, }, ); ...
Creates a new compound case specification. Pass a list of hash references as argument. Each hash reference is the same specification as passed to AI::CBR::Case.
Pass a flat hash of attribute keys and values. This will overwrite existing values, and can thus be used as a faster method for generating new cases with the same specification. Notice that keys in the different specifications of the compound object may not have the same name!
See AI::CBR for an overview of the framework.
Darko Obradovic, <dobradovic at gmx.de>
<dobradovic at gmx.de>
Please report any bugs or feature requests to bug-ai-cbr at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AI-CBR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ai-cbr at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc AI::CBR::Case::Compound
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=AI-CBR
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/AI-CBR
CPAN Ratings
http://cpanratings.perl.org/d/AI-CBR
Search CPAN
http://search.cpan.org/dist/AI-CBR
Copyright 2009 Darko Obradovic, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AI::CBR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::CBR
CPAN shell
perl -MCPAN -e shell install AI::CBR
For more information on module installation, please visit the detailed CPAN module installation guide.