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

NAME

Language::Befunge::Storage::Generic::Vec - a generic N-dimensional LaheySpace.

SYNOPSIS

    # create a 3-dimensional LaheySpace.
    my $torus = Language::Befunge::Storage::Generic::Vec->new(3);
    $torus->clear();
    $torus->store(<<"EOF");
    12345
    67890
    \fabcde
    fghij
    EOF

Note you usually don't need to use this module directly. Language::Befunge::Interpreter can optionally use it. If you are considering using it, you should really install Language::Befunge::Storage::Generic::Vec::XS too, as this module is dreadfully slow without it. If you cannot install that, you should use Language::Befunge::Storage::Generic::AoA instead, it will perform better.

DESCRIPTION

This module implements a traditional Lahey space.

CONSTRUCTOR

new( dimensions )

Creates a new Lahey Space.

PUBLIC METHODS

clear( )

Clear the torus.

expand( v )

Expand the torus to include the provided point.

get_value( vector )

Return the number stored in the torus at the specified location. If the value hasn't yet been set, it defaults to the ordinal value of a space (ie, #32).

/!\ As in Funge, code and data share the same playfield, the number returned can be either an instruction or a data (or even both... Eh, that's Funge! :o) ).

set_value( vector, value )

Write the supplied value in the torus at the specified location.

/!\ As in Funge, code and data share the same playfield, the number stored can be either an instruction or a data (or even both... Eh, that's Funge! :o) ).

EXTERNAL METHODS

Several methods are inherited from the Language::Befunge::Storage base class. These methods are:

    store
    store_binary
    get_char
    get_dims
    rectangle
    min
    max
    labels_lookup
    _labels_try

Please see the documentation of that module for more information.

BUGS

None known. Please inform me if you find one.

SEE ALSO

Language::Befunge::Storage::Generic::Vec::XS, Language::Befunge::Storage, Language::Befunge.

AUTHOR

Mark Glines, <infinoid@cpan.org> Jerome Quelin, <jquelin@cpan.org>

Development is discussed on <language-befunge@mongueurs.net>

COPYRIGHT & LICENSE

Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.