view release on metacpan or search on metacpan
lib/Algorithm/ConstructDFA2.pm view on Meta::CPAN
my ($self) = @_;
###################################################################
# Create dbh
$self->_log->debug("Creating database");
my $dbh = DBI->connect( $self->storage_dsn );
$dbh->{RaiseError} = 1;
# $dbh->{AutoCommit} = 1;
$self->_set_dbh( $dbh );
###################################################################
# Register Extension functions
$self->_log->debug("Register extension functions");
$self->_dbh->sqlite_create_function( '_vertex_matches', 2, sub {
return !! $self->vertex_matches->(@_);
});
lib/Algorithm/ConstructDFA2.pm view on Meta::CPAN
});
###################################################################
# Deploy schema
$self->_log->debug("Deploying schema");
$self->_deploy_schema();
###################################################################
# Insert input data
$self->_log->debug("Initialising input");
$self->_init_input;
$self->_log->debug("Initialising vertices");
$self->_init_vertices;
$self->_log->debug("Initialising edges");
$self->_init_edges;
###################################################################
# Insert pre-computed data
$self->_log->debug("Initialising match data");
$self->_init_matches;
$self->_log->debug("Computing epsilon closures");
$self->_init_epsilon_closure;
###################################################################
# Let DB analyze data so far
$self->_log->debug("Updating DB statistics");
$self->_dbh->do('ANALYZE');
# FIXME: strictly speaking, the dead state is a ombination of all
# vertices from which an accepting combination of vertices cannot
# be reached. That might be important. Perhaps when later merging
view all matches for this distribution
view release on metacpan or search on metacpan
bin/curvefit view on Meta::CPAN
push @ydata, $2;
}
my ($max_dev, $avg_dev, $src) = fit(xdata => \@xdata, ydata => \@ydata, %OPT);
print STDERR "$max_dev\n$avg_dev\n" if (opt('v'));
print STDERR JSON::PP::encode_json(\%Algorithm::CurveFit::Simple::STATS_H)."\n" if (opt('d') || opt('debug') || opt('profile'));
print "$src\n";
return 0;
}
sub opt {
view all matches for this distribution
view release on metacpan or search on metacpan
Examples/classify_test_data_in_a_file.pl view on Meta::CPAN
" 1st arg: name of the training datafile\n" .
" 2nd arg: name of the test data file\n" .
" 3rd arg: the name of the output file to which class labels will be written\n"
unless @ARGV == 3;
my $debug = 0;
### When the following variable is set to 1, only the most probable class for each
### data record is written out to the output file. This works only for the case
### when the output is sent to a `.txt' file. If the output is sent to a `.csv'
### file, you'll see all the class names and their probabilities for each data sample
Examples/classify_test_data_in_a_file.pl view on Meta::CPAN
}
$features_and_values_hash{$feature} = \@feature_values;
}
my %seen = ();
@all_class_names = grep {$_ if !$seen{$_}++} values %class_for_sample_hash;
print "\n All class names: @all_class_names\n" if $debug;
%numeric_features_valuerange_hash = ();
my %feature_values_how_many_uniques_hash = ();
%features_and_unique_values_hash = ();
foreach my $feature (keys %features_and_values_hash) {
my %seen1 = ();
Examples/classify_test_data_in_a_file.pl view on Meta::CPAN
my @minmaxvalues = minmax(\@unique_values_for_feature);
$numeric_features_valuerange_hash{$feature} = \@minmaxvalues;
}
$features_and_unique_values_hash{$feature} = \@unique_values_for_feature;
}
if ($debug) {
print "\nAll class names: @all_class_names\n";
print "\nEach sample data record:\n";
foreach my $sample (sort {sample_index($a) <=> sample_index($b)} keys %feature_values_for_samples_hash) {
print "$sample => @{$feature_values_for_samples_hash{$sample}}\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
- Updating to Module::Install 0.91
- Filter out links on BOTH source and destination
0.05 Wed 14 Nov 2007
- No functional changes
- Adding debugging messages to work out why the AUTOMATED_TESTING
tests were run when AUTOMATED_TESTING was NOT enabled at Makefile.PL
0.04 Tue 21 Aug 2007
- Added a missing dependency on Parse::CSV under AUTOMATED_TESTING
view all matches for this distribution
view release on metacpan or search on metacpan
gen_constant_list|||
get_av|5.006000||p
get_context||5.006000|n
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_mstats|||
get_no_modify|||
get_num|||
incl_perldb|||
incline|||
incpush|||
ingroup|||
init_argv_symbols|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
rsignal_restore|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
runops_debug||5.005000|
runops_standard||5.005000|
rvpv_dup|||
rxres_free|||
rxres_restore|||
rxres_save|||
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Spiffy.pm view on Meta::CPAN
no warnings;
my $self_package = shift;
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
local *boolean_arguments = sub {
qw(
-base -Base -mixin -selfless
-XXX -dumper -yaml
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Evolve.pm view on Meta::CPAN
my $rand_max = (1 << 31); ## close enough
###########################
sub debug {
print @_, "\n" if $DEBUG;
}
sub new {
my $pkg = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/canned_example1.pl view on Meta::CPAN
mask => $mask,
K => 3,
max_em_iterations => 300,
seeding => 'random',
terminal_output => 1,
debug => 0,
);
$clusterer->read_data_from_file();
# For visualizing the raw data:
view all matches for this distribution
view release on metacpan or search on metacpan
*/
#ifdef TEST
#define DEB(x)
#define DDB(x) x
#define DEBUG 0 /* minimal debugging */
#ifdef MSDOS
#include <time.h>
struct timeval {
unsigned long ticks;
return 0 ;
else
m++ ;
return 1 ;
}
#endif /* debug */
/*
* invert_mat() takes a matrix and produces its inverse
* k is the size of the matrix.
* (Gauss-Jordan, adapted from Numerical Recipes in C)
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-cache-memcached.t view on Meta::CPAN
plan skip_all => '$ENV{ MEMCACHED_SERVER } is not set';
}
plan tests => 6;
require 't/tlib.pm';
$tlib::skip_concurrency = $tlib::skip_concurrency = 1;
tlib::test_backend( 'Cache::Memcached', { servers => [ $ENV{MEMCACHED_SERVER} ], debug => 0 })
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Genetic/Diploid/Base.pm view on Meta::CPAN
=cut
sub new {
my $package = shift;
$logger->debug("instantiating new $package object");
my %self = @_;
$self{'id'} = $id++;
# experiment is provided as an argument
if ( $self{'experiment'} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|n
deprecate_commaless_var_list|||
get_context||5.006000|n
get_cvn_flags|5.009005||p
get_cvs|5.011000||p
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_mstats|||
get_no_modify|||
get_num|||
incpush_use_sep|||
incpush|||
ingroup|||
init_argv_symbols|||
init_dbargs|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rv2cv_op_cv||5.013006|
rvpv_dup|||
rxres_free|||
rxres_restore|||
unreferenced_to_tmp_stack|||
unshare_hek_or_pvn|||
unshare_hek|||
unsharepvn||5.004000|
unwind_handler_stack|||
update_debugger_info|||
upg_version||5.009005|
usage|||
utf16_textfilter|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
'isa' => 'Str',
'is' => 'rw',
'default' => 'unknown'
);
has 'debug_cb' => (
'isa' => 'CodeRef',
'is' => 'rw',
'default' => sub {
sub {
my @args = @_;
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
print(@args);
}
}
);
has '_orig_debug_cb' => (
'isa' => 'CodeRef',
'is' => 'rw',
'default' => sub {
sub {
}
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
# -------- methods --------
sub BUILD {
my ($self) = @_;
my $orig_cb = $self->debug_cb;
$self->_orig_debug_cb($orig_cb);
my $new_cb = sub {
my $str = join('', @_);
$str = (($self->am_i_dave) ? 'Dave: ' : 'Alice: ') . $self->nickname . ' ' . $str;
return $orig_cb->($str);
};
$self->debug_cb($new_cb);
return;
}
sub init {
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
if (length($new) != (32 + 32)) {
die('decrypt_message: length($new) != 32 + 32 ; length is ' . length($new));
}
$self->debug_cb->('decrypt_message: rekeying');
$self->session_key(substr($new, 0, 32));
$self->mac_key(substr($new, 32, 32));
$self->cipher(Crypt::OpenSSL::AES->new($self->session_key));
return;
}
$self->debug_cb->("decrypt_message: from $username ; msg $msg");
return $msg;
}
sub encrypt_message {
lib/Algorithm/IRCSRP2.pm view on Meta::CPAN
=item * B<am_i_dave> (ro, Bool) - Child class will set this.
=item * B<cbc_blocksize> (ro, Int) - CBC blocksize. Defaults to '16'.
=item * B<debug_cb> (rw, CodeRef) - Debug callback. Defaults to C<print()>
=item * B<error> (rw, Str) - If set, there was an error.
=item * B<nickname> (rw, Str) - Child class will set this. Defaults to 'unknown'.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/which_cluster_for_new_data.pl view on Meta::CPAN
K => 3,
cluster_seeding => 'random', # also try 'smart'
use_mahalanobis_metric => 1, # also try '0'
terminal_output => 1,
write_clusters_to_files => 1,
debug => 0,
);
$clusterer->read_data_from_file();
my ($clusters_hash, $cluster_centers_hash) = $clusterer->kmeans();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/KNN/XS.pm view on Meta::CPAN
=over 4
=item * $knn->Print( ... )
Prints the current tree. Normally useful for debugging.
my $output = $knn->Print(
points => 1,
);
view all matches for this distribution
view release on metacpan or search on metacpan
Algorithm-LBFGS.xs view on Meta::CPAN
#include "ppport.h"
#include "lbfgs.h"
/* Macros for debugging */
/* uncomment the line below to enable tracing and timing */
/* #define __ENABLE_TRACING__ */
#ifdef __ENABLE_TRACING__
view all matches for this distribution
view release on metacpan or search on metacpan
DEBUG_SBOX32_HASH|5.027001||Viu
DEBUG_SCOPE|5.008001||Viu
DEBUG_s_FLAG|5.007001||Viu
DEBUG_S_FLAG|5.017002||Viu
DEBUG_STACK_r|5.009005||Viu
debug_start_match|5.009004||Viu
DEBUG_STATE_r|5.009004||Viu
DEBUG_s_TEST|5.007001||Viu
DEBUG_S_TEST|5.017002||Viu
DEBUG_t|5.003007||Viu
DEBUG_T|5.007001||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
get_debug_opts|5.008001||Viu
get_deprecated_property_msg|5.031011||cVniu
getegid|5.005000||Viu
getenv|5.005000||Viu
getenv_len|5.006000||Viu
GETENV_LOCK|5.033005||Viu
ingroup|5.003007||Viu
INIT|5.003007||Viu
init_argv_symbols|5.007003||Viu
init_constants|5.017003||Viu
init_dbargs|||iu
init_debugger|5.005000||Viu
init_i18nl10n|5.006000||cVu
init_i18nl14n|5.006000||dcVu
initialize_invlist_guts|5.029002||Viu
init_ids|5.005000||Viu
init_interp|5.005000||Viu
magic_freemglob|5.033004||Viu
magic_freeovrld|5.007001||Viu
magic_freeutf8|5.033004||Viu
magic_get|5.003007||Viu
magic_getarylen|5.003007||Viu
magic_getdebugvar|5.021005||Viu
magic_getdefelem|5.004000||Viu
magic_getnkeys|5.004005||Viu
magic_getpack|5.003007||Viu
magic_getpos|5.003007||Viu
magic_getsig|5.003007||Viu
magic_set|5.003007||Viu
magic_set_all_env|5.004004||Viu
magic_setarylen|5.003007||Viu
magic_setcollxfrm|5.004000||Viu
magic_setdbline|5.003007||Viu
magic_setdebugvar|5.021005||Viu
magic_setdefelem|5.004000||Viu
magic_setenv|5.003007||Viu
magic_sethint|5.009004||Vi
magic_sethint_feature|5.031007||Viu
magic_setisa|5.003007||Viu
PERL_deBruijnMagic32|5.035003||Viu
PERL_deBruijnMagic64|5.035003||Viu
PERL_deBruijnShift32|5.035003||Viu
PERL_deBruijnShift64|5.035003||Viu
PERL_DEBUG|5.008001||Viu
Perl_debug_log|5.003007||Viu
PERL_DEBUG_PAD|5.007003||Viu
PERL_DEBUG_PAD_ZERO|5.007003||Viu
PERL_DECIMAL_VERSION|5.019008||Viu
PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION|5.009003||Viu
perl_destruct|5.007003|5.007003|n
PERLIOBUF_DEFAULT_BUFSIZ|5.013007||Viu
PerlIO_canset_cnt|5.003007|5.003007|n
PerlIO_clearerr|5.007003|5.007003|
PerlIO_close|5.007003|5.007003|
PerlIO_context_layers|||u
PerlIO_debug|5.007001|5.007001|
PERLIO_DUP_CLONE|5.007003||Viu
PERLIO_DUP_FD|5.007003||Viu
PerlIO_eof|5.007003|5.007003|
PerlIO_error|5.007003|5.007003|
PerlIO_exportFILE|5.003007|5.003007|n
PERL_MAGIC_bm|5.007002|5.003007|p
PERL_MAGIC_checkcall|5.013006|5.013006|
PERL_MAGIC_collxfrm|5.007002|5.003007|p
PERL_MAGIC_dbfile|5.007002|5.003007|p
PERL_MAGIC_dbline|5.007002|5.003007|p
PERL_MAGIC_debugvar|5.021005|5.021005|
PERL_MAGIC_defelem|5.007002|5.003007|p
PERL_MAGIC_env|5.007002|5.003007|p
PERL_MAGIC_envelem|5.007002|5.003007|p
PERL_MAGIC_ext|5.007002|5.003007|p
PERL_MAGIC_fm|5.007002|5.003007|p
PL_DBsingle_iv|5.021005||Viu
PL_DBsub|5.005000||pV
PL_DBtrace|5.005000||pV
PL_DBtrace_iv|5.021005||Viu
PL_debstash|5.005000|5.003007|poVnu
PL_debug|5.005000||Viu
PL_debug_pad|5.007003||Viu
PL_defgv|5.004005|5.003007|p
PL_def_layerlist|5.007003||Viu
PL_defoutgv|5.005000||Viu
PL_defstash|5.005000||Viu
PL_delaymagic|5.005000||Viu
PL_maxsysfd|5.005000|5.005000|
PL_mbrlen_ps|5.031010||Viu
PL_mbrtowc_ps|5.031010||Viu
PL_Mem|5.006000||Viu
PL_mem_log|5.033005||Viu
PL_memory_debug_header|5.009004||Viu
PL_MemParse|5.006000||Viu
PL_MemShared|5.006000||Viu
PL_mess_sv|5.005000|5.004000|poVnu
PL_min_intro_pending|5.005000||Viu
PL_minus_a|5.005000||Viu
PL_vtbl_backref|5.015000||Viu
PL_vtbl_bm|5.015000||Viu
PL_vtbl_checkcall|5.017000||Viu
PL_vtbl_collxfrm|5.015000||Viu
PL_vtbl_dbline|5.015000||Viu
PL_vtbl_debugvar|5.021005||Viu
PL_vtbl_defelem|5.015000||Viu
PL_vtbl_env|5.015000||Viu
PL_vtbl_envelem|5.015000||Viu
PL_vtbl_fm|5.015000||Viu
PL_vtbl_hints|5.015000||Viu
reg_named_buff_nextkey|5.009005||cVu
reg_named_buff_scalar|5.009005||cVu
regnext|5.003007||cVu
reg_node|5.005000||Viu
regnode_guts|5.021005||Viu
regnode_guts_debug|||Viu
REGNODE_MAX|5.009004||Viu
REGNODE_SIMPLE|5.013002||Viu
REGNODE_VARIES|5.013002||Viu
reg_numbered_buff_fetch|5.009005||cViu
reg_numbered_buff_length|5.009005||cViu
RsPARA|5.003007||Viu
RsRECORD|5.005000||Viu
RsSIMPLE|5.003007||Viu
RsSNARF|5.003007||Viu
run_body|5.006000||Viu
runops_debug|5.005000||cVu
RUNOPS_DEFAULT|5.005000||Viu
runops_standard|5.005000||cVu
run_user_filter|5.009003||Viu
rv2cv_op_cv|5.013006|5.013006|
RV2CVOPCV_FLAG_MASK|5.021004||Viu
SETHOSTENT_R_PROTO|5.008000|5.008000|Vn
SETi|5.003007||Viu
setjmp|5.005000||Viu
setlinebuf|5.005000||Viu
setlocale|5.009000||Viu
setlocale_debug_string|5.027002||Vniu
SETLOCALE_LOCK|5.033005||Viu
SETLOCALE_R_PROTO|5.008000|5.008000|Vn
SETLOCALE_UNLOCK|5.033005||Viu
SET_MARK_OFFSET|5.006000||Viu
setmode|5.005000||Viu
unreferenced_to_tmp_stack|5.013002||Viu
unshare_hek|5.004000||Viu
unshare_hek_or_pvn|5.008000||Viu
unsharepvn|5.003007|5.003007|u
unwind_handler_stack|5.009003||Viu
update_debugger_info|5.009005||Viu
upg_version|5.009005|5.009005|
UPG_VERSION|5.019008||Viu
uproot_SV|||Viu
Uquad_t|5.006000|5.006000|Vn
U_S|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
0.03 March 2013
- Floating point number serialisation apparently differs among
platforms, making a test fail; attempt to address that.
0.02 March 2014
- Removed accidental debug print
0.01 March 2014
- Initial release
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
_delta_normalized_error => undef,
_cluster_search_multiplier => $args{cluster_search_multiplier} || 1,
_visualize_each_iteration => $args{visualize_each_iteration} == 0 ? 0 : 1,
_show_hidden_in_3D_plots => $args{show_hidden_in_3D_plots} == 0 ? 0 : 1,
_make_png_for_each_iteration => $args{make_png_for_each_iteration} == 0 ? 0 : 1,
_debug => $args{debug} || 0,
_N => 0,
_KM => $args{K} * $args{cluster_search_multiplier},
_data_hash => {},
_data_tags => [],
_data_dimensions => 0,
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my @cluster_center = @{$self->add_point_coords($tag_set)};
@cluster_center = map {my $x = $_/$cluster_size; $x} @cluster_center;
# for covariance calculation:
my ($num_rows,$num_cols) = ($self->{_data_dimensions}, scalar(@$tag_set));
print "\nThe data will be stuffed into a matrix of $num_rows rows and $num_cols columns\n\n"
if $self->{_debug};
my $matrix = Math::GSL::Matrix->new($num_rows,$num_cols);
my $mean_vec = Math::GSL::Matrix->new($num_rows,1);
# All the record labels are stored in the array $self->{_data_tags}. The actual
# data for clustering is stored in a hash at $self->{_data_hash} whose keys are
# the record labels; the value associated with each key is the array holding the
# corresponding numerical multidimensional data.
$mean_vec->set_col(0, \@cluster_center);
if ($self->{_debug}) {
print "\nDisplaying the mean vector for the cluster:\n";
display_matrix( $mean_vec ) if $self->{_terminal_output};
}
foreach my $j (0..$num_cols-1) {
my $tag = $tag_set->[$j];
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
$matrix->set_col($j, \@diff_from_mean);
}
my $transposed = transpose( $matrix );
my $covariance = $matrix * $transposed;
$covariance *= 1.0 / $num_cols;
if ($self->{_debug}) {
print "\nDisplaying the Covariance Matrix for cluster:";
display_matrix( $covariance ) if $self->{_terminal_output};
}
return ($mean_vec, $covariance);
}
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my $covariance = shift;
my ($eigenvalues, $eigenvectors) = $covariance->eigenpair;
my $num_of_eigens = @$eigenvalues;
my $largest_eigen_index = 0;
my $smallest_eigen_index = 0;
print "Eigenvalue 0: $eigenvalues->[0]\n" if $self->{_debug};
foreach my $i (1..$num_of_eigens-1) {
$largest_eigen_index = $i if $eigenvalues->[$i] > $eigenvalues->[$largest_eigen_index];
$smallest_eigen_index = $i if $eigenvalues->[$i] < $eigenvalues->[$smallest_eigen_index];
print "Eigenvalue $i: $eigenvalues->[$i]\n" if $self->{_debug};
}
print "\nlargest eigen index: $largest_eigen_index\n" if $self->{_debug};
print "\nsmallest eigen index: $smallest_eigen_index\n\n" if $self->{_debug};
my @all_my_eigenvecs;
foreach my $i (0..$num_of_eigens-1) {
my @vec = $eigenvectors->[$i]->as_list;
my @eigenvec;
foreach my $ele (@vec) {
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
} else {
die "Eigendecomposition produced a complex eigenvector -- " .
"which should not happen for a covariance matrix!";
}
}
print "Eigenvector $i: @eigenvec\n" if $self->{_debug};
push @all_my_eigenvecs, \@eigenvec;
}
my @largest_eigen_vec = $eigenvectors->[$largest_eigen_index]->as_list;
print "\nLargest eigenvector: @largest_eigen_vec\n" if $self->{_debug};
my @sorted_eigenvec_indexes = sort {$eigenvalues->[$b] <=> $eigenvalues->[$a]} 0..@all_my_eigenvecs-1;
my @sorted_eigenvecs;
my @sorted_eigenvals;
foreach my $i (0..@sorted_eigenvec_indexes-1) {
$sorted_eigenvecs[$i] = $all_my_eigenvecs[$sorted_eigenvec_indexes[$i]];
$sorted_eigenvals[$i] = $eigenvalues->[$sorted_eigenvec_indexes[$i]];
}
if ($self->{_debug}) {
print "\nHere come sorted eigenvectors --- from the largest to the smallest:\n";
foreach my $i (0..@sorted_eigenvecs-1) {
print "eigenvec: @{$sorted_eigenvecs[$i]} eigenvalue: $sorted_eigenvals[$i]\n";
}
}
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my $KM = $self->{_KM};
my @initial_cluster_center_tags;
my $visualization_msg;
my @initial_cluster_center_indexes = $self->initialize_cluster_centers($KM, $self->{_N});
print "Randomly selected indexes for cluster center tags: @initial_cluster_center_indexes\n"
if $self->{_debug};
@initial_cluster_center_tags = map {$self->{_data_tags}->[$_]} @initial_cluster_center_indexes;
my @initial_cluster_center_coords = map {$self->{_data_hash}->{$_}} @initial_cluster_center_tags;
if ($self->{_debug}) {
foreach my $centroid (@initial_cluster_center_coords) {
print "Initial cluster center coords: @{$centroid}\n";
}
}
my $initial_clusters = $self->assign_data_to_clusters_initial(\@initial_cluster_center_coords);
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
$self->visualize_clusters_on_sphere($visualization_msg, $initial_clusters, "png")
if $self->{_make_png_for_each_iteration};
}
foreach my $cluster (@$initial_clusters) {
my ($mean, $covariance) = $self->estimate_mean_and_covariance($cluster);
display_mean_and_covariance($mean, $covariance) if $self->{_debug};
}
my @clusters = @$initial_clusters;
display_clusters(\@clusters) if $self->{_debug};
my $iteration_index = 0;
my $unimodal_correction_flag;
my $previous_min_value_for_unimodality_quotient;
while ($iteration_index < $self->{_max_iterations}) {
print "\n\n========================== STARTING ITERATION $iteration_index =====================\n\n"
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my @trailing_eigenvec_matrices_for_all_subspaces;
my @reference_vecs_for_all_subspaces;
foreach my $cluster (@clusters) {
next if @$cluster == 0;
my ($mean, $covariance) = $self->estimate_mean_and_covariance($cluster);
display_mean_and_covariance($mean, $covariance) if $self->{_debug};
print "--------------end of displaying mean and covariance\n\n" if $self->{_debug};
my ($eigenvecs, $eigenvals) = $self->eigen_analysis_of_covariance($covariance);
my @trailing_eigenvecs = @{$eigenvecs}[$self->{_P} .. $self->{_data_dimensions}-1];
my @trailing_eigenvals = @{$eigenvals}[$self->{_P} .. $self->{_data_dimensions}-1];
my $subspace_construction_error = reduce {abs($a) + abs($b)} @trailing_eigenvals;
push @subspace_construction_errors_this_iteration, $subspace_construction_error;
my $trailing_eigenvec_matrix = Math::GSL::Matrix->new($self->{_data_dimensions},
scalar(@trailing_eigenvecs));
foreach my $j (0..@trailing_eigenvecs-1) {
print "trailing eigenvec column: @{$trailing_eigenvecs[$j]}\n" if $self->{_debug};
$trailing_eigenvec_matrix->set_col($j, $trailing_eigenvecs[$j]);
}
push @trailing_eigenvec_matrices_for_all_subspaces,$trailing_eigenvec_matrix;
push @reference_vecs_for_all_subspaces, $mean;
}
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
push @{$best_subspace_based_partition_of_data{$index_for_closest_subspace}},
$data_tag;
}
print "empty-cluster jag: total reconstruction error in this iteration: \n" .
"$total_reconstruction_error_this_iteration\n"
if $self->{_debug};
foreach my $i (0..$self->{_KM}-1) {
$clusters[$i] = $best_subspace_based_partition_of_data{$i};
}
display_clusters(\@newclusters) if $self->{_terminal_output};
@clusters = grep {@$_ != 0} @newclusters;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my @new_final_clusters;
map { foreach my $ele (keys %{$self->{_data_tags_to_cluster_label_hash}}) {
push @{$new_final_clusters[$_]}, $ele
if $self->{_data_tags_to_cluster_label_hash}->{$ele} == $_ }
} 0..$self->{_K}-1;
if ($self->{_debug}) {
print "\ndisplaying the final clusters after accounting for unclustered data:\n";
display_clusters(\@new_final_clusters);
}
$self->{_final_clusters} = \@new_final_clusters;
@final_clusters = @new_final_clusters;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my $subspace_construction_error = reduce {abs($a) + abs($b)} @trailing_eigenvals;
push @subspace_construction_errors, $subspace_construction_error;
my $trailing_eigenvec_matrix = Math::GSL::Matrix->new($self->{_data_dimensions},
scalar(@trailing_eigenvecs));
foreach my $j (0..@trailing_eigenvecs-1) {
print "trailing eigenvec column: @{$trailing_eigenvecs[$j]}\n" if $self->{_debug};
$trailing_eigenvec_matrix->set_col($j, $trailing_eigenvecs[$j]);
}
push @trailing_eigenvec_matrices_for_all_subspaces,$trailing_eigenvec_matrix;
push @reference_vecs_for_all_subspaces, $mean;
}
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my $new_mean_dist_val = exp( -1.0 * $mean_dist_val / $dist_bet_means_based_normalizer );
$W_dist_between_means_based->set_elem($i,$j,$new_mean_dist_val);
}
}
$W = $W_reconstruction_error_based + $W_dist_between_means_based;
if ($self->{_debug}) {
print "\nDisplaying the similarity matrix W for the cluster graph:\n";
display_matrix($W) if $self->{_terminal_output};
}
my $add_all_columns = Math::GSL::Matrix->new($num_nodes,1);
foreach my $col (0..$num_nodes-1) {
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
}
my ($eigenvalues, $eigenvectors) = $A->eigenpair;
my $num_of_eigens = @$eigenvalues;
my $largest_eigen_index = 0;
my $smallest_eigen_index = 0;
if ($self->{_debug2}) {
print "Eigenvalue 0: $eigenvalues->[0]\n";
foreach my $i (1..$num_of_eigens-1) {
$largest_eigen_index = $i if $eigenvalues->[$i] > $eigenvalues->[$largest_eigen_index];
$smallest_eigen_index = $i if $eigenvalues->[$i] < $eigenvalues->[$smallest_eigen_index];
print "Eigenvalue $i: $eigenvalues->[$i]\n";
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
push @eigenvec, -1.0 * $mag;
} else {
die "Eigendecomposition produced a complex eigenvector!";
}
}
print "Eigenvector $i: @eigenvec\n" if $self->{_debug2};
push @all_my_eigenvecs, \@eigenvec;
}
if ($self->{_debug2}) {
my @largest_eigen_vec = $eigenvectors->[$largest_eigen_index]->as_list;
print "\nLargest eigenvector of A: @largest_eigen_vec\n";
}
my @sorted_eigenvec_indexes = sort {$eigenvalues->[$b] <=> $eigenvalues->[$a]} 0..@all_my_eigenvecs-1;
print "sorted eigenvec indexes for A: @sorted_eigenvec_indexes\n" if $self->{_debug2};
my @sorted_eigenvecs;
my @sorted_eigenvals;
foreach my $i (0..@sorted_eigenvec_indexes-1) {
$sorted_eigenvecs[$i] = $all_my_eigenvecs[$sorted_eigenvec_indexes[$i]];
$sorted_eigenvals[$i] = $eigenvalues->[$sorted_eigenvec_indexes[$i]];
}
if ($self->{_debug2}) {
print "\nHere come sorted eigenvectors for A --- from the largest to the smallest:\n";
foreach my $i (0..@sorted_eigenvecs-1) {
print "eigenvec: @{$sorted_eigenvecs[$i]} eigenvalue: $sorted_eigenvals[$i]\n";
}
}
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
foreach my $dimen (0..$self->{_data_dimensions}-1) {
push @coordinate_vec, $min_bounds[$dimen] + rand($ranges[$dimen]);
}
push @random_points, \@coordinate_vec;
}
if ($self->{_debug}) {
print "\nrandom points\n";
map {print "@$_\n"} @random_points;
}
my @mean = $mean->as_list;
unshift @random_points, \@mean;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
max_iterations
delta_reconstruction_error
visualize_each_iteration
show_hidden_in_3D_plots
make_png_for_each_iteration
debug
/;
my $found_match_flag;
foreach my $param (@params) {
foreach my $legal (@legal_params) {
$found_match_flag = 0;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
_total_number_of_samples_needed => $args{total_number_of_samples_needed}
|| croak("total_number_of_samples_needed required"),
_number_of_clusters_on_sphere => $args{number_of_clusters_on_sphere} || 3,
_cluster_width => $args{cluster_width} || 0.1,
_show_hidden_in_3D_plots => $args{show_hidden_in_3D_plots} || 1,
_debug => $args{debug} || 0,
}, $class;
}
sub _check_for_illegal_params3 {
my @params = @_;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
$cluster_covariance->[$j]->[$k] = 0.0 if $j != $k;
}
}
push @covariances, $cluster_covariance;
}
if ($self->{_debug}) {
foreach my $i (0..$K-1) {
print "\n\nCluster center: @{$cluster_centers[$i]}\n";
print "\nCovariance:\n";
foreach my $j (0..1) {
foreach my $k (0..1) {
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my @data_dump;
foreach my $i (0..$K-1) {
my @m = @{shift @cluster_centers};
my @covar = @{shift @covariances};
my @new_data = Math::Random::random_multivariate_normal($N, @m, @covar);
if ($self->{_debug}) {
print "\nThe points for cluster $i:\n";
map { print "@$_ "; } @new_data;
print "\n\n";
}
my @wrapped_data;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
}
$wrapped_d->[0] = $d->[0] unless defined $wrapped_d->[0];
$wrapped_d->[1] = $d->[1] unless defined $wrapped_d->[1];
push @wrapped_data, $wrapped_d;
}
if ($self->{_debug}) {
print "\nThe unwrapped points for cluster $i:\n";
map { print "@$_ "; } @wrapped_data;
print "\n\n";
}
my $label = $point_labels[$i];
my $j = 0;
@new_data = map {unshift @$_, $label."_".$j; $j++; $_} @wrapped_data;
push @data_dump, @new_data;
}
if ($self->{_debug}) {
print "\n\nThe labeled points for clusters:\n";
map { print "@$_\n"; } @data_dump;
}
fisher_yates_shuffle( \@data_dump );
open OUTPUT, ">$output_file";
my $total_num_of_points = $N * $K;
print "Total number of data points that will be written out to the file: $total_num_of_points\n"
if $self->{_debug};
foreach my $ele (@data_dump) {
my ($x,$y,$z);
my $label = $ele->[0];
my $azimuth = $ele->[1];
my $elevation = $ele->[2];
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
$z = sin($elevation);
my $csv_str = join ",", ($label,$x,$y,$z);
print OUTPUT "$csv_str\n";
}
print "\n\n";
print "Data written out to file $output_file\n" if $self->{_debug};
close OUTPUT;
}
# This version for the embedded class for data generation
sub visualize_data_on_sphere {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/MasterMind/Evo.pm view on Meta::CPAN
$p->{'_partitions'} = scalar (keys %{$partitions->{$c}});
}
}
if ($generations_equal == MAX_GENERATIONS_RESET ) { #reset pop
# Print for debugging
my %population;
for my $p ( @$pop ) {
$population{$p->{'_str'}}++;
}
for my $s ( sort { $population{$b} <=> $population{$a} } keys %population ) {
view all matches for this distribution
view release on metacpan or search on metacpan
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|
deprecate_old|||
get_av|5.006000||p
get_context||5.006000|n
get_cvn_flags||5.009005|
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_mstats|||
get_no_modify|||
get_num|||
incline|||
incpush_if_exists|||
incpush|||
ingroup|||
init_argv_symbols|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rvpv_dup|||
rxres_free|||
rxres_restore|||
rxres_save|||
unpackstring||5.008001|
unshare_hek_or_pvn|||
unshare_hek|||
unsharepvn||5.004000|
unwind_handler_stack|||
update_debugger_info|||
upg_version||5.009005|
usage|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
utf8_distance||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/MinPerfHashTwoLevel.pm view on Meta::CPAN
if ($source_hash) {
$self->{source_hash}= $source_hash;
} else {
$source_hash= $self->{source_hash};
}
my $debug= $self->{debug} ||= 0;
# reuse the constructor seed.
$self->_seed($self->{constructor_seed});
# find the number of keys we have to deal with
lib/Algorithm/MinPerfHashTwoLevel.pm view on Meta::CPAN
$counter,
$max_tries,
0+keys(%$source_hash),
unpack("H*",$seed),
unpack("H*",$state),
if $debug;
my $bad_idx= compute_xs($self)
or return $self->{buckets};
push @failed_seeds, $seed;
lib/Algorithm/MinPerfHashTwoLevel.pm view on Meta::CPAN
=item new
Construct a new Algorithm::MinPerfHashTwoLevel object. Optional arguments
which may be provided are 'source_hash' which is a hash reference to use
as the source for the minimal perfect hash, 'seed' which is expected to be
a 16 byte string, and 'debug' which is expected to be 0 or 1, as well
as variant, which may be 5 (use version v0.14 for variants before 5).
The default is 5.
=item compute
view all matches for this distribution
view release on metacpan or search on metacpan
- I really had an odd style for initializing variables from @_
back in 2003. Made it less odd.
- Small inefficiency with the column count in nw_text_graph() fixed.
1.21
Sun Sep 24 2012
- Added color debugging code in eg/svg.pl (it lists the
color settings in XML comments).
- Updated eg/text.pl to take command line options.
- Moved graph and text option handling to their own functions,
graph_segment() and text_segment(), for future non-messy coding.
Fri Sep 22 2012
- Modernized parts of the code -- $VERSION is now an 'our'
variable instead of a 'use VARS' variable, for example.
- Added 'create_license => 1' to the Build.PL list of attributes.
- Added 'dynamic_config => 0' to the Build.PL list of attributes.
- Added LICENSE to the MANIFEST file.
- Yanked an "$flag_internal" variable (and its debugging code)
in favor of Smart::Comments.
- Bumped the $VERSION value up a point.
1.20
Sun May 20 2012
- Really bad bug introduced in version 1.08 (text graph
view all matches for this distribution
view release on metacpan or search on metacpan
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|
deprecate_old|||
get_av|5.006000||p
get_context||5.006000|n
get_cvn_flags||5.009005|
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_mstats|||
get_no_modify|||
get_num|||
incline|||
incpush_if_exists|||
incpush|||
ingroup|||
init_argv_symbols|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rvpv_dup|||
rxres_free|||
rxres_restore|||
rxres_save|||
unpackstring||5.008001|
unshare_hek_or_pvn|||
unshare_hek|||
unsharepvn||5.004000|
unwind_handler_stack|||
update_debugger_info|||
upg_version||5.009005|
usage|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
utf8_distance||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Pair/Best2.pm view on Meta::CPAN
join(', ', keys %args);
}
return bless($self, ref($proto) || $proto);
}
### my (%cache, %all, @head); # debug variables.
###
###
### sub dbg_hash {
### my ($self, $key, $val) = @_;
###
view all matches for this distribution
view release on metacpan or search on metacpan
_load_PL_utf8_foldclosures|||
_make_exactf_invlist|||
_new_invlist_C_array|||
_new_invlist|||
_pMY_CXT|5.007003||p
_setlocale_debug_string|||n
_setup_canned_invlist|||
_swash_inversion_hash|||
_swash_to_invlist|||
_to_fold_latin1|||
_to_uni_fold_flags||5.014000|
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
defelem_target|||
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|n
get_context||5.006000|n
get_cvn_flags|||
get_cvs|5.011000||p
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_invlist_iter_addr|||n
get_invlist_offset_addr|||n
get_invlist_previous_index_addr|||n
incpush|||
ingroup|||
init_argv_symbols|||
init_constants|||
init_dbargs|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
magic_dump||5.006000|
magic_existspack|||
magic_freearylen_p|||
magic_freeovrld|||
magic_getarylen|||
magic_getdebugvar|||
magic_getdefelem|||
magic_getnkeys|||
magic_getpack|||
magic_getpos|||
magic_getsig|||
magic_scalarpack|||
magic_set_all_env|||
magic_setarylen|||
magic_setcollxfrm|||
magic_setdbline|||
magic_setdebugvar|||
magic_setdefelem|||
magic_setenv|||
magic_sethint|||
magic_setisa|||
magic_setlvref|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rv2cv_op_cv||5.013006|
rvpv_dup|||
rxres_free|||
rxres_restore|||
unreferenced_to_tmp_stack|||
unshare_hek_or_pvn|||
unshare_hek|||
unsharepvn||5.003070|
unwind_handler_stack|||
update_debugger_info|||
upg_version||5.009005|
usage|||
utf16_textfilter|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 Thu Nov 10 2022
- greatly improve search performance
0.03 Sun Jun 5 2022
- fix mark underflow problem on debugging perls
0.02 Tue May 31 2022
- fix compilation on threaded perls
0.01 Mon May 30 2022
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Algorithm-QuineMcCluskey
1.01
2019-12-03
- Debug changes only, does not affect the operation of the
non-debug code:
Smart comments had some obsolete variables that are now
changed. The chart() function, used by Smart comments, made
use of firstidx(), which was provided by a module that is no
longer included. Changed the code in chart() to use the any()
- Check to see if the terms (minterms, maxterms, or
dont-cares) are larger than 'width' in bit size.
It's possible I made that mistake myself recently.
- And although it's not an error, run the terms through
sort and uniq before converting to bitstrings. It
makes visual inspection of the debug output easier.
0.09
2016-6-27
- Found a case where don't-care terms with no covers
were nonetheless included with the prime implicants.
Fixed by changing a map{}-everything-will-work into
a loop.
2015-1-16
- New function tableformat() (current name, at least) to show
primes hash in the table form used in textbook Quine-McCluskey
descriptions. Should help users understand what's going on,
and help in debugging too.
- New module to contain tableforms() (and future functions),
named it Algorithm::QuineMcCluskey::Format.
- Do-while using is_LequivalentR() was supposed to be comparing
hash keys, but a 'keys' had been left off on one side.
Fixing that saves at least one loop.
changing one of the outer loops in purge_essentials,
and remel() becomes remels()).
2014-11-13
- The test with don't-care terms randomly fails two thirds
of the time. Separate it into its own file, and add
debugging statements.
2014-11-4
- Extended the object test to consider minterms, maxterms,
and columnstrings methods of creation.
- deAlias considered finished and merged into the master
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/RandomPointGenerator.pm view on Meta::CPAN
bless {
_hist_file => $args{input_histogram_file} || croak("histogram file required"),
_bbox_file => $args{bounding_box_file} || croak("bounding box file required"),
_N => $args{number_of_points} || 2000,
_how_many_to_discard => $args{how_many_to_discard} || 500,
_debug => $args{debug} || 0,
_proposal_density_width => $args{proposal_density_width} || 0.1,
_y_axis_pos_direction => $args{y_axis_pos_direction} || "down",
_output_hist_bins_along_x => $args{output_hist_bins_along_x} || 40,
_command_line_mode => $args{command_line_mode} || 0,
_x_delta => undef,
lib/Algorithm/RandomPointGenerator.pm view on Meta::CPAN
my $sample = shift;
my $histref = $self->{_normalized_input_hist};
my $bbsize = $self->{_bounding_box};
my $horiz_delta = $self->{_x_delta};
my $vert_delta = $self->{_y_delta};
print "horiz_delta: $horiz_delta vert_delta: $vert_delta\n" if $self->{_debug};
return 0 if $sample->[0] < $bbsize->[0][0] || $sample->[0] > $bbsize->[0][1] ||
$sample->[1] < $bbsize->[1][0] || $sample->[1] > $bbsize->[1][1];
print "horizontal extent: $bbsize->[0][0] $bbsize->[0][1]\n" if $self->{_debug};
print "vertical extent: $bbsize->[1][0] $bbsize->[1][1]\n" if $self->{_debug};
my $bin_horiz = int( ($sample->[0] - $bbsize->[0][0]) / $horiz_delta );
my $bin_vert = int( ($sample->[1] - $bbsize->[1][0]) / $vert_delta );
print "bin 2D index: horiz: $bin_horiz vert: $bin_vert for sample value @$sample\n"
if $self->{_debug};
my $prob00 = $histref->[$bin_vert][$bin_horiz] || 0;
return $prob00 if (($bin_horiz + 1) >= @{$histref->[0]}) || (($bin_vert + 1) >= @{$histref});
my $prob01 = $histref->[$bin_vert + 1][$bin_horiz] || 0;
my $prob10 = $histref->[$bin_vert][$bin_horiz+ 1] || 0;
my $prob11 = $histref->[$bin_vert + 1][$bin_horiz + 1] || 0;
print "The four probs: $prob00 $prob01 $prob10 $prob11\n" if $self->{_debug};
my $horiz_fractional = (($sample->[0] - $bbsize->[0][0]) / $horiz_delta) - $bin_horiz;
my $vert_fractional = (($sample->[1] - $bbsize->[1][0]) / $vert_delta) - $bin_vert;
print "horiz frac: $horiz_fractional vert frac: $vert_fractional\n" if $self->{_debug};
my $interpolated_prob = $prob00 * (1 - $horiz_fractional) * (1 - $vert_fractional) +
$prob10 * $horiz_fractional * (1 - $vert_fractional) +
$prob01 * (1 - $horiz_fractional) * $vert_fractional +
$prob11 * $horiz_fractional * $vert_fractional;
print "Interpolated prob: $interpolated_prob\n" if $self->{_debug};
return $interpolated_prob;
}
sub proposal_density {
my $self = shift;
lib/Algorithm/RandomPointGenerator.pm view on Meta::CPAN
how_many_to_discard
proposal_density_width
y_axis_pos_direction
output_hist_bins_along_x
command_line_mode
debug
/;
my $found_match_flag;
foreach my $param (@params) {
foreach my $legal (@legal_params) {
$found_match_flag = 0;
lib/Algorithm/RandomPointGenerator.pm view on Meta::CPAN
=item B<display_output_histogram_in_terminal_window():>
$generator->display_output_histogram_in_terminal_window();
Useful for debugging purposes, it displays in the terminal window a two dimensional
array of numbers that is the histogram of the random points generated by the module.
=back
=head1 THE C<examples> DIRECTORY
view all matches for this distribution
view release on metacpan or search on metacpan
gen_constant_list|||
get_av|5.006000||p
get_context||5.006000|n
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_mstats|||
get_no_modify|||
get_num|||
incline|||
incpush_if_exists|||
incpush|||
ingroup|||
init_argv_symbols|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rvpv_dup|||
rxres_free|||
rxres_restore|||
rxres_save|||
view all matches for this distribution