Plucen...vector(3pm)
β¨ Plucene::Bitvector β a vector of bits β¨
ok so bestie, welcome to Plucene::Bitvector π this is one of those little perl manpages that ships with User Contributed Perl Documentation, and honestly? it's short, it's sweet, and it does exactly one thing. let's get into it π«Ά
πΈ NAME πΈ
Plucene::Bitvector β a vector of bits π
like. that's it. that's the whole vibe. a vector. of bits. iconic.
β¨ SYNOPSIS β¨
# isa Bit::Vector::Minimal;
my $bitvector = Plucene::Bitvector->read($stream);
$bitvector->write($stream);
my $count = $bitvector->count;
see how the very first line is a comment saying it's a Bit::Vector::Minimal? yeah that's not a suggestion, that's the whole personality. read it, write it, count it. slay. β¨
π¦ DESCRIPTION π¦
so Plucene::Bitvector is a serialisable implementation of a vector of bits. no cap.
and here's the tea β β it's a subclass of Bit::Vector::Minimal, which is what gives it the power to write vectors to a Plucene stream and read them back from one. so basically: bits go in, bits come out, and they survive the trip through a stream. the way that it justβ¦ serialises? obsessed. π
π METHODS π
π count
my $count = $bitvector->count;
computes the number of one-bits. that's it. it counts the ones. it does not count the zeros, it does not count your problems, it counts the 1s. periodt. π
π write
$bitvector->write($stream);
writes this vector out to the stream you passed in. hand it a stream, it hands back your bits. π«Ά
π read
my $bitvector = Plucene::Bitvector->read($stream);
reads from the stream you passed in. give it a stream, it gives you a bitvector. main character energy fr fr. πβ¨
lowkey reminder: this is a subclass of Bit::Vector::Minimal, so all that base-class behaviour is coming along for the ride. you didn't think it was just vibes, did you? π
π SIGN-OFF π
and that's the whole page, bestie β no more methods, no more secrets, we ate and left no crumbs π
this little gem comes to you from perl v5.36.0, dated 2022-12-04, filed under Plucen...vector(3pm) in the user contributed perl documentation section. go forth and count your one-bits, you absolute legend πβπ
π¦ where this page comes from
- debian bookworm: libplucene-perl 1.25-5
- debian trixie: libplucene-perl 1.25-5
- ubuntu noble: libplucene-perl 1.25-5
- ubuntu resolute: libplucene-perl 1.25-5
- ubuntu stonking: libplucene-perl 1.25-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms