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

NAME

Bio::Grid::Run::SGE::Index::Dummy - dummy index for testing purposes

SYNOPSIS

  use Bio::Grid::Run::SGE::Index::Dummy;

  my $idx = Bio::Grid::Run::SGE::Index::Dummy->new( idx_file => undef )->create;
  my @letters = ( 'a' .. 'z' );
  for ( my $i = 0; $i < $idx->num_elem; $i++ ) {
    is( $idx->get_elem($i), $letters[$i] );
  }

DESCRIPTION

This index contains the letters of the alphabet (a-z), hardcoded. The first element corresponds to 'a'. If you create an iterator class, it might be usfull for testing purposes.

METHODS

$idx = $idx->create()

Creates the index. You need to call it, before you want to use the index. Returns the index object.

$idx = $idx->close()

Does nothing. Returns the index object.

$number_of_elements = $idx->num_elem()

Returns the number of elements. This number is not fixed, because the number of elements depends on the chunk size.

$idx->type

Does nothing.

$elem = $idx->get_elem($element_index)

returns the element at index position $element_index.

SEE ALSO

AUTHOR

jw bargsten, <jwb at cpan dot org>