HDF5::Group(3pm)
π HDF5::Group π
okay bestie, listen β this is the HDF5::Group page, part of the User Contributed Perl Documentation collection. It's the manual page for PDL::IO::HDF5::Group and it's literally the little helper buddy that makes HDF5 groups go brrr. β¨
πΈ NAME πΈ
PDL::IO::HDF5::Group β the PDL::IO::HDF5 Helper Object that represents HDF5 groups. She's a supporting character but she carries the whole plot, no cap. π
π DESCRIPTION π
So here's the tea: this is a helper-object that PDL::IO::HDF5 uses to talk to the group objects of the HDF5 format. She's the liaison, the middle woman, the connector. π«Ά
Wanna learn more about the HDF5 Format itself? The HDF Group's web site is sitting right there at http://www.hdfgroup.org β go be nosy, it's encouraged. π¦
β¨ SYNOPSIS β¨
See PDL::IO::HDF5 β that's where all the β¨main characterβ¨ action lives. This page is the backstage pass.
π MEMBER DATA π
These are her core attributes, her ~personality traits~ if you will:
π ID
The ID number the HDF5 library handed to the group. Her government name, basically. πͺͺ
π name
The name of the group. It's absolute to the root group '/' β so like /maingroup/subgroup. She knows her full address, she's not lost. πΊοΈ
π parent
Ref to the parent object (file or group) that owns this group. Her parent. Her guardian. Her keeper. π
π fileObj
Ref to the PDL::IO::HDF5 object that owns this object. The big boss at the very top of the family tree. π³
π§ METHODS π§
The whole repertoire, every trick she knows. π
π new
PDL::IO::HDF5::Group Constructor β she's born, she's here, she's serving. π
Usage:
Usually you don't build her yourself β this object will usually be created using the calling format detailed in the SYNOPSIS. But just so you know the lore, the following syntax is what the PDL::IO::HDF5 object uses to build the object. π
$a = new PDL::IO::HDF5:Group( name => $name, parent => $parent,
fileObj => $fileObj );
Args:
$name Name of the group (relative to the parent)
$parent Parent Object that owns this group
$fileObj PDL::HDF (Top Level) object that owns this group.
So <cyan>$name is the name relative to the parent, <cyan>$parent is the parent object that owns this group, and <cyan>$fileObj is the top-level <cyan>PDL::HDF object that owns this group. π«Ά
π DESTROY
PDL::IO::HDF5 Destructor β she's logging off, closing the HDF5::Group object. π
Usage:
No Usage. Automatically called. She leaves on her own terms, nobody has to ask twice. π
π attrSet
Set the value of an attribute (or several β she's flexible like that). β¨
Supports null-terminated strings, integers and floating point scalar and 1D array attributes.
Usage:
$group->attrSet( 'attr1' => 'attr1Value',
'attr2' => 'attr2 value',
'attr3' => $pdl,
.
.
.
);
Returns undef on failure, 1 on success. That's the vibe check β
π attrGet
Get the value of an attribute (or several). The read to attrSet's write, iconic duo behavior. π«Ά
Supports null-terminated strings, integer and floating point scalar and 1D array attributes.
Usage:
my @attrs = $group->attrGet( 'attr1', 'attr2');
π attrDel
Delete attribute(s). Gone. Blocked. Unfollowed. π
Usage:
$group->attrDel( 'attr1',
'attr2',
.
.
.
);
Returns undef on failure, 1 on success.
π attrs
Get a list of all attribute names in a group. Roll call, everyone say present πβ¨
Usage:
@attrs = $group->attrs;
π dataset
Open an existing dataset in a group, or create a brand new one. Either way she's got you. π¦
Usage:
$dataset = $group->dataset('newdataset');
Returns undef on failure, 1 on success.
π datasets
Get a list of all dataset names in a group. Relative to the current group β so, local girlies only, no full paths. π
Usage:
@datasets = $group->datasets;
π group
Open an existing group inside an existing group, or create a fresh new one. Groups within groups within groups β it's giving πͺ matryoshka energy. π
Usage:
$newgroup = $oldgroup->group("newgroup");
Returns undef on failure, 1 on success.
π groups
Get a list of all group names in a group. Relative to the current group. Same deal as <cyan>datasets β no absolute paths here, bestie. πΈ
Usage:
@groupNames = $group->groups;
π _buildAttrIndex
Internal Recursive Method to build the attribute index hash for the object. Note the underscore β this is private, she's not taking visitors, this is her behind the scenes work. π
So the deal is: for the purposes of indexing groups by their attributes, the attributes are applied hierarchial. i.e. any attributes of the higher level groups are assumed to be apply for the lower level groups. Inheritance, but make it attributes. π
Usage:
$group->_buildAttrIndex($index, $currentAttrs);
Input/Output:
$index: Total Index hash ref
$currentAttrs: Hash refs of the attributes valid
for the current group.
π IDget
Returns the HDF5 library ID for this object. Her official ID card, swipe it and go. πͺͺπ
Usage:
my $ID = $groupObj->IDget;
π nameGet
Returns the HDF5 Group Name for this object. (Relative to the root group β so this one is the fuller path, unlike <cyan>datasetsandgroups`.) πΊοΈβ¨
Usage:
my $name = $groupObj->nameGet;
π reference
Creates a reference to a region of a dataset. Like a little sticky note pointing at part of something bigger. π
Usage:
$groupObj->reference($referenceName,$datasetObj,@regionStart,@regionCount);
Create a reference named $referenceName within the group $groupObj to a subroutine of the dataset $datasetObj. The region to be referenced is defined by the @regionStart and @regionCount arrays. π
π unlink
Unlink an object from a group. Not deleting-deleting, just... detaching. It's complicated. π
Usage:
$groupObj->unlink($objectName);
Unlink the named object from the group. π«Ά
π‘ reminder bestie: every single option, arg, and return value above is exactly as the original page says it. Don't freestyle with your file handles. π
Okay that's the whole page, you ate that fr fr. π This was HDF5::Group(3pm) from the User Contributed Perl Documentation, running on perl v5.42.3 and dated 2026-08-21. Go forth and group responsibly, mwah ππ
π¦ where this page comes from
- ubuntu stonking: libpdl-io-hdf5-perl 1:0.762-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms