Bit::Vector::Array - Perl extension for manipulating bit vectors as an array


Bit-Vector-Array documentation  | view source Contained in the Bit-Vector-Array distribution.

Index


NAME

Top

Bit::Vector::Array - Perl extension for manipulating bit vectors as an array

SYNOPSIS

Top

	use Bit::Vector::Array;
	bva(my @my_array);

	@my_array=8;	# 1000 binary. index 4 .. 1
	$my_array[2]=1;	# 1010 binary. bit index 2

	print "vector is ".@my_array."\n";	# vector is 10

DESCRIPTION

Top

Bit::Vector::Array is used to store an integer, but access bits of that integer as a bit vector. The integer is stored by assigning to the scalar value of an array. Individual bits are accessed by indexing into the array. The bit indexes start at 1 and increase from there.

To set the least significant bit in @arr, use this: $arr[1]=1;

EXPORT

The bva routine is exported. This is used to create a new bit vector array.

	bva(my @arr_name);

SEE ALSO

Top

AUTHOR

Top

email@greglondon.com

COPYRIGHT AND LICENSE

Top


Bit-Vector-Array documentation  | view source Contained in the Bit-Vector-Array distribution.