Result:
found more than 868 distributions - search limited to the first 2001 files matching your query ( run in 0.929 )


Geo-FIT

 view release on metacpan or  search on metacpan

t/03_value.t  view on Meta::CPAN

$o->open or die $o->error;
@header_things = $o->fetch_header;

$ret_val = undef;

my $temp_max_i = 300;                   # temporary number of iterations (ensure we don't end up in endless loop if anything goes wrong)
my $i;
while ( my $ret = $o->fetch ) {
    # we are testing with callbacks, so not much to do here
    # as we add more tests, set the last to be when we have the latest one to test, i.e. will probably zones_target
    # last if $device_info_got;

 view all matches for this distribution


Geo-GDAL

 view release on metacpan or  search on metacpan

lib/Geo/GDAL.dox  view on Meta::CPAN

# @param progress_data [optional]
# @return

## @ignore FillNodata

## @method FillNoData($mask, $max_search_dist, $smoothing_iterations, $options, coderef progress, $progress_data)
# Interpolate values for cells in this raster. The cells to fill
# should be marked in the mask band with zero.
#
# @param mask [optional] a mask band indicating cells to be interpolated (zero valued) (default is to get it with Geo::GDAL::Band::GetMaskBand).
# @param max_search_dist [optional] the maximum number of cells to
# search in all directions to find values to interpolate from (default is 10).
# @param smoothing_iterations [optional] the number of 3x3 smoothing filter passes to run (0 or more) (default is 0).
# @param options [optional] A reference to a hash. No options have been defined so far for this algorithm (default is {}).
# @param progress [optional] a reference to a subroutine, which will
# be called with parameters (number progress, string msg, progress_data) (default is undef).
# @param progress_data [optional] (default is undef).
#

 view all matches for this distribution


Geo-Geos

 view release on metacpan or  search on metacpan

src/mapbox/earcut.hpp  view on Meta::CPAN


    Node* stop = ear;
    Node* prev;
    Node* next;

    int iterations = 0;

    // iterate through ears, slicing them one by one
    while (ear->prev != ear->next) {
        iterations++;
        prev = ear->prev;
        next = ear->next;

        if (hashing ? isEarHashed(ear) : isEar(ear)) {
            // cut off the triangle

 view all matches for this distribution


Geo-HelmertTransform

 view release on metacpan or  search on metacpan

lib/Geo/HelmertTransform.pm  view on Meta::CPAN

    my $niter = 0;
    do {
        $lat = $lat2;
        $v = $datum->a() / sqrt(1 - $datum->e2() * sin($lat) ** 2);
        $lat2 = atan2(($z + $datum->e2() * $v * sin($lat)), $p);
        die "exceeded 10000 iterations without converging in Geo::HelmertTransform::xyz_to_geo"
            if (++$niter > 10000);
    } while (abs($lat2 - $lat) > 2e-6); # about 1/10000 mile

    $h = $p / cos($lat) - $v;

 view all matches for this distribution


Geo-Hex-V3-XS

 view release on metacpan or  search on metacpan

author/benchmark.pl  view on Meta::CPAN

    ok 7 - size
    1..7
ok 16 - XM488276746051234
------------------------------------------------------------
Creates zone object from geohex:
Benchmark: timing 30000 iterations of pp, xs...
        pp: 21 wallclock secs (21.49 usr +  0.09 sys = 21.58 CPU) @ 1390.18/s (n=30000)
        xs:  2 wallclock secs ( 1.84 usr +  0.01 sys =  1.85 CPU) @ 16216.22/s (n=30000)
      Rate    pp    xs
pp  1390/s    --  -91%
xs 16216/s 1066%    --
------------------------------------------------------------
------------------------------------------------------------
Creates zone object from latlng:
Benchmark: timing 30000 iterations of pp, xs...
        pp: 23 wallclock secs (22.65 usr +  0.11 sys = 22.76 CPU) @ 1318.10/s (n=30000)
        xs:  2 wallclock secs ( 1.98 usr +  0.01 sys =  1.99 CPU) @ 15075.38/s (n=30000)
      Rate    pp    xs
pp  1318/s    --  -91%
xs 15075/s 1044%    --
------------------------------------------------------------
------------------------------------------------------------
Converts latlng to geohex:
Benchmark: timing 60000 iterations of pp, xs...
Write failed: Broken pipe
        pp: 46 wallclock secs (45.80 usr +  0.20 sys = 46.00 CPU) @ 1304.35/s (n=60000)
        xs:  2 wallclock secs ( 1.17 usr +  0.00 sys =  1.17 CPU) @ 51282.05/s (n=60000)
      Rate    pp    xs
pp  1304/s    --  -97%
xs 51282/s 3832%    --
------------------------------------------------------------
------------------------------------------------------------
Converts geohex to latlng:
Benchmark: timing 60000 iterations of pp, xs...
        pp: 43 wallclock secs (42.95 usr +  0.19 sys = 43.14 CPU) @ 1390.82/s (n=60000)
        xs:  1 wallclock secs ( 1.38 usr +  0.01 sys =  1.39 CPU) @ 43165.47/s (n=60000)
      Rate    pp    xs
pp  1391/s    --  -97%
xs 43165/s 3004%    --

 view all matches for this distribution


Geo-Index

 view release on metacpan or  search on metacpan

examples/benchmark.pl  view on Meta::CPAN

		&$_code();
		$t1 = Time::HiRes::time();
		$count++;
	} until ($t1 >= $t_end );
	my $duration = $t1 - $t0;
	print "$count iterations over $duration seconds, ".($count/$duration)." iterations per second\n";
	return [ $count, $duration ];
}

 view all matches for this distribution


Geo-MedianCenter-XS

 view release on metacpan or  search on metacpan

lib/Geo/MedianCenter/XS.pm  view on Meta::CPAN


Computes the median center of a list of points. Options are C<points>,
an array of arrays of latitude and longitude in decimal degrees and
optionally a weight; C<tolerance>, a number in meters, if the iterative
algorithm improves its approximation by at most this value, the function
will return; C<max_iterations>, the function will return after this
many attempts to refine the approximation. Returns the latitude and
longitude in decimal degrees.

=item haversine_distance_dec($lat1, $lon1, $lat2, $long2)

 view all matches for this distribution


Geo-Raster

 view release on metacpan or  search on metacpan

lib/Geo/Raster/Image.pm  view on Meta::CPAN

# Intelligence. 12(6). 541-551. (Same as in GRASS but done in a bit
# different, and more generic way, I believe). 
#
# The thinning algorithm defines a set of structuring templates and
# applies them in several passes until there are no matches or until the
# maxiterations is reached. Trimming means certain structuring templates
# are applied to kill emerging short limbs which appear because of the
# noise in the raster.
# 
# Exple of thinning:
# @code

lib/Geo/Raster/Image.pm  view on Meta::CPAN

# - <I>algorithm</I> => character (optional). By default "B", the other option 
# is "A".
# - <I>trimming</I> => binary (optional). By default 0, the other option is 1. 
# Trimming removes artificial branches which grow on the side of wide lines in 
# thinnning, but it also shortens a bit the real branches.
# - <I>maxiterations</I> => integer (optional). By default 0 (no maximum, will 
# iterate until no cells are deleted).
# - <I>width</I> => double (optional). Used to define the maximum iterations 
# count. In case the width is given then the maxiterations is set to 
# int(width/2).
# @return a new raster. In void context changes this raster.
# @note The thinned raster must be a binary raster.
sub thin {
    my($self, %opt) = @_;

lib/Geo/Raster/Image.pm  view on Meta::CPAN

    my @trimmer = (\@G1,\@G2,\@G3,\@G4,\@G5,\@G6,\@G7,\@G8);
    my $algorithm = $opt{algorithm};
    $algorithm = 'B' unless $algorithm;
    my $trimming = $opt{trimming};
    $trimming = 0 unless $trimming;
    my $maxiterations = $opt{maxiterations};
    $maxiterations = 0 unless $maxiterations;
    my $width = $opt{width};
    $maxiterations = int($width/2) if $width;
    my @thinner;
    if ($algorithm eq 'B') {
	if ($trimming) {
	    @thinner = (\@D1,\@D2,\@E1,@trimmer,
			\@D2,\@D3,\@E2,@trimmer,

lib/Geo/Raster/Image.pm  view on Meta::CPAN

	$M = $m;
	foreach (@thinner) {
	    $m += ral_grid_applytempl($self->{GRID}, $_, 0);
	    print STDERR "#" unless $opt{quiet};
	}
	print STDERR " thinning, pass $i/$maxiterations: deleted ", $m-$M, " cells\n" unless $opt{quiet};
	$i++;
    } while ($m > $M and !($maxiterations > 0 and $i > $maxiterations));
    return $self if defined wantarray;
}

## @method Geo::Raster borders(%params)
#

 view all matches for this distribution


GeoIP2

 view release on metacpan or  search on metacpan

maxmind-db/perltidyrc  view on Meta::CPAN

--blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-b
-bar
-boc
-ci=4

 view all matches for this distribution


Getopt-EX-Config

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Getopt-EX-Config

1.0202 2026-02-17T09:19:40Z

    - Fix set() bug: $c was not reset between iterations, causing
      second and subsequent dot-notation keys to fail

    - Document nested hash configuration and dot notation
      * Dot notation access (e.g., hashed.h3=1) for nested hashes
      * Getopt::Long hash type (%) for module private options

 view all matches for this distribution


Getopt-Long-Bash

 view release on metacpan or  search on metacpan

GETOPTLONG.md  view on Meta::CPAN

    [ output     | o :        # Specify output file         ]=/dev/stdout
    [ mode       | m ?        # Operation mode (optional)   ]=
    [ include    | i @        # Include path (multiple ok)  ]=()
    [ define     | D %        # Definition (KEY=VALUE)      ]=()
    [ execute    | x  !       # Execute command             ]=my_execute_function
    [ count      | N : =i     # Number of iterations (int)  ]=1
    [ ratio      | r : =f     # Ratio (float)               ]=0.5
    [ id         | K : =(^[a-z0-9_]+$) # ID (alphanum & _)  ]=default_id
)
```

GETOPTLONG.md  view on Meta::CPAN


#### 4.4.1. Integer Validation (`=i`)

Validates if the argument is an integer.

*   **Definition Example:** `[count|c:COUNT=i # Number of iterations]` (assuming COUNT is the destination variable) or `[count|c:=i # Number of iterations]` (if using default variable name).

*   **Behavior:** If the argument is not an integer, an error message is displayed, and the script exits (default behavior, if `EXIT_ON_ERROR=1`).

*   Applicable to array options (`@...=i`) and the value part of hash options (`%...=i`).

 view all matches for this distribution


Getopt-Long-Descriptive

 view release on metacpan or  search on metacpan

lib/Getopt/Long/Descriptive.pm  view on Meta::CPAN

#pod
#pod In addition, any constraint understood by Params::Validate may be used.
#pod
#pod For example, to accept positive integers:
#pod
#pod   [ 'max-iterations=i', "maximum number of iterations",
#pod     { callbacks => { positive => sub { shift() > 0 } } } ],
#pod
#pod (Internally, all constraints are translated into Params::Validate options or
#pod callbacks.)
#pod

lib/Getopt/Long/Descriptive.pm  view on Meta::CPAN


In addition, any constraint understood by Params::Validate may be used.

For example, to accept positive integers:

  [ 'max-iterations=i', "maximum number of iterations",
    { callbacks => { positive => sub { shift() > 0 } } } ],

(Internally, all constraints are translated into Params::Validate options or
callbacks.)

 view all matches for this distribution


Getopt-Type-Tiny

 view release on metacpan or  search on metacpan

xt/perltidyrc  view on Meta::CPAN


# break before all operators
--want-break-before="% + - * / x != == >= <= =~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

# run at least twice to improve stability
--iterations=2

 view all matches for this distribution


Gibbs

 view release on metacpan or  search on metacpan

lib/Gibbs.pm  view on Meta::CPAN

# Class data and methods 
# Attributes 
{
	# _states and _adj are inherited from Markov parent class
	my %_attribute_properties = (
		_k						=> 3,					# the number of iterations for which nothing changing will be considered convergence, Default 3
		_seqs					=> [ ],					# an anon array containing all the DNA sequences we are searching/sampling from
		_motif_len				=> 7,					# the length of the motif we are searching for, Default 7
		_alphabet				=> '',					# the set of possible symbols available
		_samples				=> [ ],					# a list of the samples we pull, will be updated each iteration
		_profiles				=> [ ],					# a list of the last k profiles, so that we can tell when we've reached convergence

 view all matches for this distribution


Git-Helpers

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

--blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-b
-bar
-boc
-ci=4

 view all matches for this distribution


Git-Libgit2

 view release on metacpan or  search on metacpan

t/torture-init.t  view on Meta::CPAN


my ( $maj, $min, $rev ) = version();
ok( defined $maj && $maj >= 1, "libgit2 version $maj.$min.$rev (major >= 1)" );

# Hammer init/shutdown — should not leak or crash.
my $iterations = 5000;
for my $i ( 1 .. $iterations ) {
  my $rc = init_lib();
  # Refcount starts at 1 on first init and increments each subsequent pass.
  ok( $rc >= 1, "init_lib pass $i returned refcount $rc (>= 1)" );
  shutdown_lib();
}

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

deps/libgit2/deps/pcre/pcre_compile.c  view on Meta::CPAN


/*************************************************
*    Scan compiled regex for auto-possession     *
*************************************************/

/* Replaces single character iterations with their possessive alternatives
if appropriate. This function modifies the compiled opcode!

Arguments:
  code        points to start of the byte code
  utf         TRUE in UTF-8 / UTF-16 / UTF-32 mode

 view all matches for this distribution


Git-XS

 view release on metacpan or  search on metacpan

xs/libgit2/src/ppc/sha1ppc.S  view on Meta::CPAN

 * Perform a step with F0, and load W(s).  Uses W(s) as a temporary
 * before loading it.
 * This is actually 10 instructions, which is an awkward fit.
 * It can execute grouped as listed, or delayed one instruction.
 * (If delayed two instructions, there is a stall before the start of the
 * second line.)  Thus, two iterations take 7 cycles, 3.5 cycles per round.
 */
#define STEPD0_LOAD(t,s) \
add RE(t),RE(t),W(t); andc   %r0,RD(t),RB(t);  and    W(s),RC(t),RB(t); \
add RE(t),RE(t),%r0;  rotlwi %r0,RA(t),5;      rotlwi RB(t),RB(t),30;   \
add RE(t),RE(t),W(s); add    %r0,%r0,%r5;      lwz    W(s),(s)*4(%r4);  \

 view all matches for this distribution


Glib-Ex-ConnectProperties

 view release on metacpan or  search on metacpan

t/MyTestHelpers.pm  view on Meta::CPAN

#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
#                 main_iterations
#                 warn_suppress_gtk_icon
#                 glib_gtk_versions
#                 any_signal_connections
#                 nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);

t/MyTestHelpers.pm  view on Meta::CPAN

#-----------------------------------------------------------------------------
# Gtk/Glib helpers

# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that.  In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
  my $count = 0;
  if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
  while (Gtk2->events_pending) {
    $count++;
    Gtk2->main_iteration_do (0);

    if ($count >= 500) {
      MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
      return;
    }
  }
  MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}

# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme.  Eg,
#

t/MyTestHelpers.pm  view on Meta::CPAN

  while (! $done) {
    if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event()   iteration $count"); }
    Gtk2->main_iteration;
    $count++;
  }
  MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");

  $widget->signal_handler_disconnect ($sig_id);
  Glib::Source->remove ($timer_id);
}

 view all matches for this distribution


Glib-Ex-ObjectBits

 view release on metacpan or  search on metacpan

t/MyTestHelpers.pm  view on Meta::CPAN

#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
#                 main_iterations
#                 warn_suppress_gtk_icon
#                 glib_gtk_versions
#                 any_signal_connections
#                 nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);

t/MyTestHelpers.pm  view on Meta::CPAN

#-----------------------------------------------------------------------------
# Gtk/Glib helpers

# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that.  In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
  my $count = 0;
  if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
  while (Gtk2->events_pending) {
    $count++;
    Gtk2->main_iteration_do (0);

    if ($count >= 500) {
      MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
      return;
    }
  }
  MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}

# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme.  Eg,
#

t/MyTestHelpers.pm  view on Meta::CPAN

  while (! $done) {
    if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event()   iteration $count"); }
    Gtk2->main_iteration;
    $count++;
  }
  MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");

  $widget->signal_handler_disconnect ($sig_id);
  Glib::Source->remove ($timer_id);
}

 view all matches for this distribution


Google-RestApi

 view release on metacpan or  search on metacpan

lib/Google/RestApi/SheetsApi4.pm  view on Meta::CPAN


Set auto recalculation mode ('ON_CHANGE', 'MINUTE', 'HOUR').

=item ss_iteration_count($count)

Set maximum iterations for circular references.

=item ss_iteration_threshold($threshold)

Set convergence threshold for iterative calculations.

 view all matches for this distribution


Graph-Centrality-Pagerank

 view release on metacpan or  search on metacpan

lib/Graph/Centrality/Pagerank.pm  view on Meta::CPAN


=item C<minIterations>

 minIterations => 0

C<minIterations> is the minimum number of iterations that will be computed
before the pagerank iterations are stopped, even if C<maxRelError> is achieved.
The default is zero.

=item C<maxIterations>

 maxIterations => int (2 * ((maxRelError / ln (dampeningFactor) + 1))

C<maxIterations> is the maximum number of iterations that can be performed
to approximate the pagerank vector even if C<maxRelError> is not achieved.
The default is C<2 * ((maxRelError / ln (dampeningFactor) + 1)>. If
C<dampeningFactor> is zero, then C<maxIterations> is one. If C<dampeningFactor>
is one, then C<maxIterations> is equal to the total nodes in the graph.

lib/Graph/Centrality/Pagerank.pm  view on Meta::CPAN

  # set max relative error, default is sqrt (machine epsilon).
  $Parameters{maxRelError} = sqrt ($Self->_getMachineEpsilon ()) unless (exists ($Parameters{maxRelError}));
  $Parameters{maxRelError} = abs ($Parameters{maxRelError}) if (exists ($Parameters{maxRelError}));
  $Parameters{maxRelError} = 0.01 if ($Parameters{maxRelError} > 0.01);

  # set default min iterations.
  $Parameters{minIterations} = 1 unless (exists ($Parameters{minIterations}));
  $Parameters{minIterations} = abs ($Parameters{minIterations});

  # set default max iterations.
  unless (exists ($Parameters{maxIterations}))
  {
    $Parameters{maxIterations} = 1;
    $Parameters{maxIterations} = 1 if ($Parameters{dampeningFactor} <= 0);
    $Parameters{maxIterationsIsTotalNodes} = 1 if ($Parameters{dampeningFactor} >= 1);

lib/Graph/Centrality/Pagerank.pm  view on Meta::CPAN

  # set max relative error.
  $Parameters{maxRelError} = $Self->{defaultParameters}{maxRelError} unless (exists ($Parameters{maxRelError}));
  $Parameters{maxRelError} = abs ($Parameters{maxRelError}) if (exists ($Parameters{maxRelError}));
  $Parameters{maxRelError} = 0.01 if ($Parameters{maxRelError} > 0.01);

  # set default min iterations.
  $Parameters{minIterations} = $Self->{defaultParameters}{minIterations} unless (exists ($Parameters{minIterations}));
  $Parameters{minIterations} = abs ($Parameters{minIterations});

  # set default max iterations.
  unless (exists ($Parameters{maxIterations}))
  {
    $Parameters{maxIterations} = $Self->{defaultParameters}{maxIterations};
    if ((0 < $Parameters{dampeningFactor}) && ($Parameters{dampeningFactor} < 1))
    {

lib/Graph/Centrality/Pagerank.pm  view on Meta::CPAN

  my $pagerank = {};
  return $pagerank if ($totalNodes == 0);
  foreach my $node (@allNodes) { $pagerank->{$node} = $nodeWeights{$node}; }
  my $newPageRank = {};

  # set the maximum number of iterations.
  my $maxIterations = $Parameters{maxIterations};
  $maxIterations = $totalNodes if exists $Parameters{maxIterationsIsTotalNodes};

  for (my $iteration = 0; $iteration < $maxIterations; $iteration++)
  {

 view all matches for this distribution


Graph-Graph6

 view release on metacpan or  search on metacpan

t/MyTestHelpers.pm  view on Meta::CPAN

#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
#                 main_iterations
#                 warn_suppress_gtk_icon
#                 glib_gtk_versions
#                 any_signal_connections
#                 nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);

t/MyTestHelpers.pm  view on Meta::CPAN

#-----------------------------------------------------------------------------
# Gtk/Glib helpers

# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that.  In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
  my $count = 0;
  if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
  while (Gtk2->events_pending) {
    $count++;
    Gtk2->main_iteration_do (0);

    if ($count >= 500) {
      MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
      return;
    }
  }
  MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}

# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme.  Eg,
#

t/MyTestHelpers.pm  view on Meta::CPAN

  while (! $done) {
    if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event()   iteration $count"); }
    Gtk2->main_iteration;
    $count++;
  }
  MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");

  $widget->signal_handler_disconnect ($sig_id);
  Glib::Source->remove ($timer_id);
}

 view all matches for this distribution


Graph-Layderer

 view release on metacpan or  search on metacpan

lib/Graph/Layouter/Spring.pm  view on Meta::CPAN

between each two connected nodes; each node will have a resulting movement
force, which we will apply to the node's position (initially randomzero-zero)
after the forces calculation is finished.

However, we need to let this repeat for several times in order for the
positions to stabilize. In fact, a lot of iterations is needed; higher the
better, but also higher the slower, you can very easily get to tens of seconds
here so beware. Currently, the number of iterations is hardcoded to 500, but
this is expected to get configurable soon.

=cut

# TODO : _This_ should be all adjustable!

my $iterations = 100; # undef for no iterations limit
my $max_wait = 10; # (in seconds) undef for no time limit
my $max_repulsive_force_distance = 6;
my $k = 2;
my $c = 0.01;
my $max_vertex_movement = 0.5;

lib/Graph/Layouter/Spring.pm  view on Meta::CPAN


	# Bound execution based on time
	my $end;
	$end = time + $max_wait if defined $max_wait;

	unless (defined $end or defined $iterations) {
		croak "You did not bound the layouting loop by either time or iterations count!";
	}

	for (my $i = 0;
	     (defined $iterations ? $i < $iterations : 1)
	     	and (defined $end ? time <= $end : 1);
	     $i++) {
		_layout_iteration($graph, \@vertices);
	}

 view all matches for this distribution


Graph-Layout-Aesthetic

 view release on metacpan or  search on metacpan

bin/gloss.pl  view on Meta::CPAN


my %weight;
GetOptions('help|?|h'	=> \my $help,
           man		=> \my $man,
           version	=> \my $version,
           "it=o"	=> \my $iterations,
           "bt=f"	=> \my $begin_temp,
           "et=f"	=> \my $end_temp,
           "m!"		=> \my $monitor,
           "mr=o"	=> \my $monitor_rate,
           "s!"		=> \my $sleep,

bin/gloss.pl  view on Meta::CPAN


$monitor &&= Graph::Layout::Aesthetic::Monitor::GnuPlot->new();
my $start = time;
$aglo->gloss(begin_temperature	=> $begin_temp,
             end_temperature	=> $end_temp,
             iterations		=> $iterations,
             monitor_delay	=> $monitor_rate,
             monitor		=> $monitor,
             hold		=> defined $coord_infile);
# $aglo->normalize;
my $elapsed = time() - $start;

bin/gloss.pl  view on Meta::CPAN

display edges instead of coordinates. This is the output format the
old gloss program gave.

=item B<-it integer>

Number of iterations, defaults to 1000

=item B<-bt float>

Beginning temperature, defaults to 100

 view all matches for this distribution


Graph-Maker-Other

 view release on metacpan or  search on metacpan

t/MyTestHelpers.pm  view on Meta::CPAN

#
# use Exporter;
# use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
# @ISA = ('Exporter');
# @EXPORT_OK = qw(findrefs
#                 main_iterations
#                 warn_suppress_gtk_icon
#                 glib_gtk_versions
#                 any_signal_connections
#                 nowarnings);
# %EXPORT_TAGS = (all => \@EXPORT_OK);

t/MyTestHelpers.pm  view on Meta::CPAN

#-----------------------------------------------------------------------------
# Gtk/Glib helpers

# Gtk 2.16 can go into a hard loop on events_pending() / main_iteration_do()
# if dbus is not running, or something like that.  In any case limiting the
# iterations is good for test safety.
#
sub main_iterations {
  my $count = 0;
  if (DEBUG) { MyTestHelpers::diag ("main_iterations() ..."); }
  while (Gtk2->events_pending) {
    $count++;
    Gtk2->main_iteration_do (0);

    if ($count >= 500) {
      MyTestHelpers::diag ("main_iterations(): oops, bailed out after $count events/iterations");
      return;
    }
  }
  MyTestHelpers::diag ("main_iterations(): ran $count events/iterations");
}

# warn_suppress_gtk_icon() is a $SIG{__WARN__} handler which suppresses spam
# from Gtk trying to make you buy the hi-colour icon theme.  Eg,
#

t/MyTestHelpers.pm  view on Meta::CPAN

  while (! $done) {
    if (DEBUG >= 2) { MyTestHelpers::diag ("wait_for_event()   iteration $count"); }
    Gtk2->main_iteration;
    $count++;
  }
  MyTestHelpers::diag ("wait_for_event(): '$signame' ran $count events/iterations\n");

  $widget->signal_handler_disconnect ($sig_id);
  Glib::Source->remove ($timer_id);
}

 view all matches for this distribution


GraphViz-Traverse

 view release on metacpan or  search on metacpan

lib/GraphViz/Traverse.pm  view on Meta::CPAN

  layers       = "id:id:id:id" is a sequence of layer identifiers for overlay diagrams. The PostScript array variable layercolorseqsets the assignment of colors to layers. The least indexis1and each element must be a 3-ele- ment array to be interpret...
  layout       = Class instance setting
  margin       = f sets the page margin (included in the page size).
  no_overlap   = Class instance setting
  nodesep      = f sets the minimum separation between nodes.
  nslimit      = f ormclimit=f adjusts the bound on the number of network simplexormincross iterations by the givenratio. For example,mclimit=2.0runs twice as long.
  ordering     = out constrains order of out-edges in a subgraph according to their file sequence.
  overlap      = Class instance setting
  page         = "x,y" sets the PostScript pagination unit.
  pagedir      = [TBLR][TBLR] sets the major and minor order of pagination.
  pageheight   = Class instance setting

 view all matches for this distribution


Graphics-Penplotter-GcodeXY

 view release on metacpan or  search on metacpan

lib/Graphics/Penplotter/GcodeXY.pm  view on Meta::CPAN


A reference to an array of boolean flags, one per edge, that controls whether
each edge of every nested polygon is drawn.  Setting some flags to false can
produce striking visual effects.

=item C<iterations =E<gt> $n>  (optional)

Draw exactly C<$n> nested polygons (not counting the base polygon).  When
given, this takes precedence over C<min_size>.

=item C<min_size =E<gt> $pct>  (optional, default C<1.0>)

Stop iterating once the length of the first edge of the current polygon has
shrunk to C<$pct> percent of the original first-edge length.  Ignored when
C<iterations> is also given.

=back

Returns C<1> on success.  Croaks on invalid input.

 view all matches for this distribution


Graphics-VTK

 view release on metacpan or  search on metacpan

examples/old_examples/graphics/smoothLines.pl  view on Meta::CPAN

$bump = Graphics::VTK::BrownianPoints->new;
$bump->SetInput($line->GetOutput);
$warp = Graphics::VTK::WarpVector->new;
$warp->SetInput($bump->GetPolyDataOutput);
$warp->SetScaleFactor('.1');
$iterations = "0 10 20 30 40 50";
foreach $iteration ($iterations)
 {
  $smooth{$iteration} = Graphics::VTK::SmoothPolyDataFilter->new;
  $smooth{$iteration}->SetInput($warp->GetOutput);
  $smooth{$iteration}->SetNumberOfIterations($iteration);
  $smooth{$iteration}->BoundarySmoothingOn;

 view all matches for this distribution


Grid-Coord

 view release on metacpan or  search on metacpan

t/grid.t  view on Meta::CPAN

  ok ($val = $it->(), "Iteration $_");
  ok($val == $val->row,  "Returned just a row");
  ok(! ($val == $val->col),  "Not a column");
  ok($val->min_y == $_, "Correct row");
}
ok (! $it->(),        "No more iterations");
ok (! $it->(),        "(still) no more iterations");

my $it2 = $g2->cols_iterator;
for (3..6) {
  ok (my $val = $it2->(),     "Getting col");
  ok ($val    == $val->col,   "Is whole column");
  ok (! ($val == $val->row),  "Is not a whole row");
}
ok (! $it->(),        "No more iterations");
ok (! $it->(),        "(still) no more iterations");

my $it3 = $g2->cell_iterator;
my @cells;
while (my $cell = $it3->()) {
  push @cells, $cell;

 view all matches for this distribution


( run in 0.929 second using v1.01-cache-2.11-cpan-96521ef73a4 )