Documentation ¶
Index ¶
- Constants
- func Close() error
- func DisplayErrors(on bool) error
- func GarbageCollect() error
- func IsHDF5(name string) bool
- type ArrayType
- type Attribute
- type CommonFG
- func (g *CommonFG) CreateDataset(name string, dtype *Datatype, dspace *Dataspace) (*Dataset, error)
- func (g *CommonFG) CreateDatasetWith(name string, dtype *Datatype, dspace *Dataspace, dcpl *PropList) (*Dataset, error)
- func (g *CommonFG) CreateGroup(name string) (*Group, error)
- func (g *CommonFG) NumObjects() (uint, error)
- func (g *CommonFG) ObjectNameByIndex(idx uint) (string, error)
- func (g *CommonFG) OpenDataset(name string) (*Dataset, error)
- func (g *CommonFG) OpenGroup(name string) (*Group, error)
- type CompoundType
- func (t *CompoundType) Insert(name string, offset int, field *Datatype) error
- func (t *CompoundType) MemberClass(mbr_idx int) TypeClass
- func (t *CompoundType) MemberIndex(name string) int
- func (t *CompoundType) MemberName(mbr_idx int) string
- func (t *CompoundType) MemberOffset(mbr_idx int) int
- func (t *CompoundType) MemberType(mbr_idx int) (*Datatype, error)
- func (t *CompoundType) NMembers() int
- func (t *CompoundType) Pack() error
- type Dataset
- func (s *Dataset) Close() error
- func (s *Dataset) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error)
- func (s *Dataset) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error)
- func (s *Dataset) Datatype() (*Datatype, error)
- func (s *Dataset) OpenAttribute(name string) (*Attribute, error)
- func (s *Dataset) Read(data interface{}) error
- func (s *Dataset) ReadSubset(data interface{}, memspace, filespace *Dataspace) error
- func (s *Dataset) Space() *Dataspace
- func (s *Dataset) Write(data interface{}) error
- func (s *Dataset) WriteSubset(data interface{}, memspace, filespace *Dataspace) error
- type Dataspace
- func (s *Dataspace) Close() error
- func (s *Dataspace) Copy() (*Dataspace, error)
- func (s *Dataspace) Id() int
- func (s *Dataspace) IsSimple() bool
- func (s *Dataspace) SelectHyperslab(offset, stride, count, block []uint) error
- func (s *Dataspace) SetOffset(offset []uint) error
- func (s *Dataspace) SimpleExtentDims() (dims, maxdims []uint, err error)
- func (s *Dataspace) SimpleExtentNDims() int
- func (s *Dataspace) SimpleExtentNPoints() int
- func (s *Dataspace) SimpleExtentType() SpaceClass
- type Datatype
- func (t *Datatype) Class() TypeClass
- func (t *Datatype) Close() error
- func (t *Datatype) Committed() bool
- func (t *Datatype) Copy() (*Datatype, error)
- func (t *Datatype) Equal(o *Datatype) bool
- func (t *Datatype) GoType() reflect.Type
- func (t *Datatype) Lock() error
- func (t *Datatype) SetSize(sz uint) error
- func (t *Datatype) Size() uint
- type File
- func (f *File) Close() error
- func (f *File) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error)
- func (f *File) CreateTableFrom(name string, dtype interface{}, chunkSize, compression int) (*Table, error)
- func (f *File) FileName() string
- func (f *File) Flush(scope Scope) error
- func (f *File) OpenTable(name string) (*Table, error)
- func (f *File) ReOpen() (*File, error)
- type Group
- func (g *Group) Close() error
- func (g *Group) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error)
- func (g *Group) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error)
- func (g *Group) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error)
- func (g *Group) CreateTableFrom(name string, dtype interface{}, chunkSize, compression int) (*Table, error)
- func (g *Group) OpenTable(name string) (*Table, error)
- type IType
- type Identifier
- type Location
- type Object
- type OpaqueDatatype
- type PropList
- type PropType
- type Scope
- type SpaceClass
- type Table
- func (t *Table) Append(data interface{}) error
- func (t *Table) Close() error
- func (t *Table) CreateIndex() error
- func (t *Table) Id() int
- func (t *Table) IsValid() bool
- func (t *Table) Next(data interface{}) error
- func (t *Table) NumPackets() (int, error)
- func (t *Table) ReadPackets(start, nrecords int, data interface{}) error
- func (t *Table) SetIndex(index int) error
- func (t *Table) Type() (*Datatype, error)
- type TypeClass
- type VarLenType
- type Version
Constants ¶
const ( F_ACC_RDONLY int = 0x0000 // absence of rdwr => rd-only F_ACC_RDWR int = 0x0001 // open for read and write F_ACC_TRUNC int = 0x0002 // Truncate file, if it already exists, erasing all data previously stored in the file. F_ACC_EXCL int = 0x0004 // Fail if file already exists. F_ACC_DEBUG int = 0x0008 // print debug info F_ACC_CREAT int = 0x0010 // create non-existing files F_ACC_DEFAULT int = 0xffff // value passed to set_elink_acc_flags to cause flags to be taken from the parent file )
File constants
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close() error
Close flushes all data to disk, closes all open identifiers, and cleans up memory. It should generally be called before your application exits.
func DisplayErrors ¶
DisplayErrors enables/disables HDF5's automatic error printing
func GarbageCollect ¶
func GarbageCollect() error
GarbageCollect collects garbage on all free-lists of all types.
Types ¶
type ArrayType ¶
type ArrayType struct {
Datatype
}
func NewArrayType ¶
NewArrayType creates a new ArrayType. base_type specifies the element type of the array. dims specify the dimensions of the array.
type Attribute ¶
type Attribute struct {
Location
}
type CommonFG ¶
type CommonFG struct {
Location
}
CommonFG is for methods common to both File and Group
func (*CommonFG) CreateDataset ¶
CreateDataset creates a new Dataset.
func (*CommonFG) CreateDatasetWith ¶
func (g *CommonFG) CreateDatasetWith(name string, dtype *Datatype, dspace *Dataspace, dcpl *PropList) (*Dataset, error)
CreateDatasetWith creates a new Dataset with a user-defined PropList.
func (*CommonFG) CreateGroup ¶
CreateGroup creates a new empty group and links it to a location in the file.
func (*CommonFG) NumObjects ¶
NumObjects returns the number of objects in the Group.
func (*CommonFG) ObjectNameByIndex ¶
ObjectNameByIndex returns the name of the object at idx.
func (*CommonFG) OpenDataset ¶
OpenDataset opens a named Dataset.
type CompoundType ¶
type CompoundType struct {
Datatype
}
func NewCompoundType ¶
func NewCompoundType(size int) (*CompoundType, error)
NewCompoundType creates a new CompoundType. size is the size in bytes of the compound datatype.
func (*CompoundType) Insert ¶
func (t *CompoundType) Insert(name string, offset int, field *Datatype) error
Insert adds a new member to a compound datatype.
func (*CompoundType) MemberClass ¶
func (t *CompoundType) MemberClass(mbr_idx int) TypeClass
MemberClass returns datatype class of compound datatype member.
func (*CompoundType) MemberIndex ¶
func (t *CompoundType) MemberIndex(name string) int
MemberIndex returns the index of a compound or enumeration datatype member.
func (*CompoundType) MemberName ¶
func (t *CompoundType) MemberName(mbr_idx int) string
MemberName returns the name of a compound or enumeration datatype member.
func (*CompoundType) MemberOffset ¶
func (t *CompoundType) MemberOffset(mbr_idx int) int
MemberOffset returns the offset of a field of a compound datatype.
func (*CompoundType) MemberType ¶
func (t *CompoundType) MemberType(mbr_idx int) (*Datatype, error)
MemberType returns the datatype of the specified member.
func (*CompoundType) NMembers ¶
func (t *CompoundType) NMembers() int
NMembers returns the number of elements in a compound or enumeration datatype.
func (*CompoundType) Pack ¶
func (t *CompoundType) Pack() error
Pack recursively removes padding from within a compound datatype. This is analogous to C struct packing and will give a space-efficient type on the disk. However, using this may require type conversions on more machines, so may be a worse option.
type Dataset ¶
type Dataset struct {
Location
}
func (*Dataset) CreateAttribute ¶
func (s *Dataset) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error)
Creates a new attribute at this location.
func (*Dataset) CreateAttributeWith ¶
func (s *Dataset) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error)
Creates a new attribute at this location.
func (*Dataset) OpenAttribute ¶
Opens an existing attribute.
func (*Dataset) ReadSubset ¶
ReadSubset reads a subset of raw data from a dataset into a buffer.
func (*Dataset) WriteSubset ¶
WriteSubset writes a subset of raw data from a buffer to a dataset.
type Dataspace ¶
type Dataspace struct {
Identifier
}
func CreateDataspace ¶
func CreateDataspace(class SpaceClass) (*Dataspace, error)
CreateDataspace creates a new dataspace of a specified type.
func CreateSimpleDataspace ¶
CreateSimpleDataspace creates a new simple dataspace and opens it for access.
func (*Dataspace) SelectHyperslab ¶
SelectHyperslab creates a subset of the data space.
func (*Dataspace) SimpleExtentDims ¶
SimpleExtentDims returns dataspace dimension size and maximum size.
func (*Dataspace) SimpleExtentNDims ¶
SimpleExtentNDims returns the dimensionality of a dataspace.
func (*Dataspace) SimpleExtentNPoints ¶
SimpleExtentNPoints returns the number of elements in a dataspace.
func (*Dataspace) SimpleExtentType ¶
func (s *Dataspace) SimpleExtentType() SpaceClass
SimpleExtentType returns the current class of a dataspace.
type Datatype ¶
type Datatype struct {
Location
}
var ( T_C_S1 *Datatype = NewDatatype(C._go_hdf5_H5T_C_S1()) T_FORTRAN_S1 *Datatype = NewDatatype(C._go_hdf5_H5T_FORTRAN_S1()) T_STD_I8BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I8BE()) T_STD_I8LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I8LE()) T_STD_I16BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I16BE()) T_STD_I16LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I16LE()) T_STD_I32BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I32BE()) T_STD_I32LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I32LE()) T_STD_I64BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I64BE()) T_STD_I64LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_I64LE()) T_STD_U8BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U8BE()) T_STD_U8LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U8LE()) T_STD_U16BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U16BE()) T_STD_U16LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U16LE()) T_STD_U32BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U32BE()) T_STD_U32LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U32LE()) T_STD_U64BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U64BE()) T_STD_U64LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_U64LE()) T_STD_B8BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B8BE()) T_STD_B8LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B8LE()) T_STD_B16BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B16BE()) T_STD_B16LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B16LE()) T_STD_B32BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B32BE()) T_STD_B32LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B32LE()) T_STD_B64BE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B64BE()) T_STD_B64LE *Datatype = NewDatatype(C._go_hdf5_H5T_STD_B64LE()) T_STD_REF_OBJ *Datatype = NewDatatype(C._go_hdf5_H5T_STD_REF_OBJ()) T_STD_REF_DSETREG *Datatype = NewDatatype(C._go_hdf5_H5T_STD_REF_DSETREG()) T_IEEE_F32BE *Datatype = NewDatatype(C._go_hdf5_H5T_IEEE_F32BE()) T_IEEE_F32LE *Datatype = NewDatatype(C._go_hdf5_H5T_IEEE_F32LE()) T_IEEE_F64BE *Datatype = NewDatatype(C._go_hdf5_H5T_IEEE_F64BE()) T_IEEE_F64LE *Datatype = NewDatatype(C._go_hdf5_H5T_IEEE_F64LE()) T_UNIX_D32BE *Datatype = NewDatatype(C._go_hdf5_H5T_UNIX_D32BE()) T_UNIX_D32LE *Datatype = NewDatatype(C._go_hdf5_H5T_UNIX_D32LE()) T_UNIX_D64BE *Datatype = NewDatatype(C._go_hdf5_H5T_UNIX_D64BE()) T_UNIX_D64LE *Datatype = NewDatatype(C._go_hdf5_H5T_UNIX_D64LE()) T_INTEL_I8 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_I8()) T_INTEL_I16 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_I16()) T_INTEL_I32 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_I32()) T_INTEL_I64 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_I64()) T_INTEL_U8 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_U8()) T_INTEL_U16 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_U16()) T_INTEL_U32 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_U32()) T_INTEL_U64 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_U64()) T_INTEL_B8 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_B8()) T_INTEL_B16 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_B16()) T_INTEL_B32 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_B32()) T_INTEL_B64 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_B64()) T_INTEL_F32 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_F32()) T_INTEL_F64 *Datatype = NewDatatype(C._go_hdf5_H5T_INTEL_F64()) T_ALPHA_I8 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_I8()) T_ALPHA_I16 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_I16()) T_ALPHA_I32 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_I32()) T_ALPHA_I64 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_I64()) T_ALPHA_U8 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_U8()) T_ALPHA_U16 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_U16()) T_ALPHA_U32 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_U32()) T_ALPHA_U64 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_U64()) T_ALPHA_B8 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_B8()) T_ALPHA_B16 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_B16()) T_ALPHA_B32 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_B32()) T_ALPHA_B64 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_B64()) T_ALPHA_F32 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_F32()) T_ALPHA_F64 *Datatype = NewDatatype(C._go_hdf5_H5T_ALPHA_F64()) T_MIPS_I8 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_I8()) T_MIPS_I16 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_I16()) T_MIPS_I32 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_I32()) T_MIPS_I64 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_I64()) T_MIPS_U8 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_U8()) T_MIPS_U16 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_U16()) T_MIPS_U32 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_U32()) T_MIPS_U64 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_U64()) T_MIPS_B8 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_B8()) T_MIPS_B16 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_B16()) T_MIPS_B32 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_B32()) T_MIPS_B64 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_B64()) T_MIPS_F32 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_F32()) T_MIPS_F64 *Datatype = NewDatatype(C._go_hdf5_H5T_MIPS_F64()) T_NATIVE_CHAR *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_CHAR()) T_NATIVE_INT *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_INT()) T_NATIVE_FLOAT *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_FLOAT()) T_NATIVE_SCHAR *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_SCHAR()) T_NATIVE_UCHAR *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UCHAR()) T_NATIVE_SHORT *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_SHORT()) T_NATIVE_USHORT *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_USHORT()) T_NATIVE_UINT *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UINT()) T_NATIVE_LONG *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_LONG()) T_NATIVE_ULONG *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_ULONG()) T_NATIVE_LLONG *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_LLONG()) T_NATIVE_ULLONG *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_ULLONG()) T_NATIVE_DOUBLE *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_DOUBLE()) //#if H5_SIZEOF_LONG_DOUBLE !=0 T_NATIVE_LDOUBLE *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_LDOUBLE()) //#endif T_NATIVE_B8 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_B8()) T_NATIVE_B16 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_B16()) T_NATIVE_B32 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_B32()) T_NATIVE_B64 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_B64()) T_NATIVE_OPAQUE *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_OPAQUE()) T_NATIVE_HSIZE *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_HSIZE()) T_NATIVE_HSSIZE *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_HSSIZE()) T_NATIVE_HERR *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_HERR()) T_NATIVE_HBOOL *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_HBOOL()) T_NATIVE_INT8 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_INT8()) T_NATIVE_UINT8 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UINT8()) T_NATIVE_INT16 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_INT16()) T_NATIVE_UINT16 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UINT16()) T_NATIVE_INT32 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_INT32()) T_NATIVE_UINT32 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UINT32()) T_NATIVE_INT64 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_INT64()) T_NATIVE_UINT64 *Datatype = NewDatatype(C._go_hdf5_H5T_NATIVE_UINT64()) T_GO_STRING *Datatype = makeGoStringDatatype() )
list of predefined hdf5 data types
func CreateDatatype ¶
CreateDatatype creates a new datatype. class must be T_COMPUND, T_OPAQUE, T_ENUM or T_STRING. size is the size of the new datatype in bytes.
func NewDataTypeFromType ¶
NewDatatypeFromType creates a new Datatype from a reflect.Type.
func NewDatatype ¶
NewDatatype creates a Datatype from an hdf5 id.
func NewDatatypeFromValue ¶
NewDatatypeFromValue creates a datatype from a value in an interface.
func OpenDatatype ¶
OpenDatatype opens a named datatype.
func (*Datatype) Committed ¶
Committed determines whether a datatype is a named type or a transient type.
func (*Datatype) Equal ¶
Equal determines whether two datatype identifiers refer to the same datatype.
type File ¶
type File struct {
CommonFG
}
a HDF5 file
func (*File) CreateTable ¶
func (f *File) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error)
Creates a packet table to store fixed-length packets. hid_t H5PTcreate_fl( hid_t loc_id, const char * dset_name, hid_t dtype_id, hsize_t chunk_size, int compression )
func (*File) CreateTableFrom ¶
func (f *File) CreateTableFrom(name string, dtype interface{}, chunkSize, compression int) (*Table, error)
Creates a packet table to store fixed-length packets. hid_t H5PTcreate_fl( hid_t loc_id, const char * dset_name, hid_t dtype_id, hsize_t chunk_size, int compression )
func (*File) FileName ¶
FIXME Retrieves name of file to which object belongs. ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size )
func (*File) Flush ¶
Flushes all buffers associated with a file to disk. herr_t H5Fflush(hid_t object_id, H5F_scope_t scope )
type Group ¶
type Group struct {
CommonFG
}
Group is an HDF5 container object. It can contain any Location.
func (*Group) CreateAttribute ¶
func (g *Group) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error)
CreateAttribute creates a new attribute at this location.
func (*Group) CreateAttributeWith ¶
func (g *Group) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error)
CreateAttributeWith creates a new attribute at this location with a user-defined PropList.
func (*Group) CreateTable ¶
func (g *Group) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error)
CreateTable creates a packet table to store fixed-length packets.
type IType ¶
type IType C.H5I_type_t
type Identifier ¶
type Identifier struct {
// contains filtered or unexported fields
}
Identifier is a simple wrapper around a C hid_t. It has basic methods which apply to every type in the go-hdf5 API.
func (Identifier) File ¶
func (i Identifier) File() *File
File returns the file associated with this Identifier.
func (Identifier) Name ¶
func (i Identifier) Name() string
Name returns the full name of the Identifier
type Location ¶
type Location struct {
Identifier
}
A Location embeds Identifier. Dataset, Datatype and Group are all Locations.
type OpaqueDatatype ¶
type OpaqueDatatype struct {
Datatype
}
func (*OpaqueDatatype) SetTag ¶
func (t *OpaqueDatatype) SetTag(tag string) error
SetTag tags an opaque datatype.
func (*OpaqueDatatype) Tag ¶
func (t *OpaqueDatatype) Tag() string
Tag returns the tag associated with an opaque datatype.
type PropList ¶
type PropList struct {
Identifier
}
var (
P_DEFAULT *PropList = newPropList(C._go_hdf5_H5P_DEFAULT())
)
func NewPropList ¶
NewPropList creates a new PropList as an instance of a property list class.
type Scope ¶
type Scope C.H5F_scope_t
The difference between a single file and a set of mounted files.
type SpaceClass ¶
type SpaceClass C.H5S_class_t
const ( S_NO_CLASS SpaceClass = -1 // error S_SCALAR SpaceClass = 0 // scalar variable S_SIMPLE SpaceClass = 1 // simple data space S_NULL SpaceClass = 2 // null data space )
type Table ¶
type Table struct {
Location
}
Table is an hdf5 packet-table.
func (*Table) CreateIndex ¶
CreateIndex resets a packet table's index to the first packet.
func (*Table) Next ¶
Next reads packets from a packet table starting at the current index into the value pointed at by data. i.e. data is a pointer to an array or a slice.
func (*Table) NumPackets ¶
NumPackets returns the number of packets in a packet table.
func (*Table) ReadPackets ¶
ReadPackets reads a number of packets from a packet table.
type TypeClass ¶
type TypeClass C.H5T_class_t
const ( T_NO_CLASS TypeClass = -1 // Error T_INTEGER TypeClass = 0 // integer types T_FLOAT TypeClass = 1 // floating-point types T_TIME TypeClass = 2 // date and time types T_STRING TypeClass = 3 // character string types T_BITFIELD TypeClass = 4 // bit field types T_OPAQUE TypeClass = 5 // opaque types T_COMPOUND TypeClass = 6 // compound types T_REFERENCE TypeClass = 7 // reference types T_ENUM TypeClass = 8 // enumeration types T_VLEN TypeClass = 9 // variable-length types T_ARRAY TypeClass = 10 // array types T_NCLASSES TypeClass = 11 // nbr of classes -- MUST BE LAST )
type VarLenType ¶
type VarLenType struct {
Datatype
}
func NewVarLenType ¶
func NewVarLenType(base_type *Datatype) (*VarLenType, error)
NewVarLenType creates a new VarLenType. base_type specifies the element type of the VarLenType.
func (*VarLenType) IsVariableStr ¶
func (vl *VarLenType) IsVariableStr() bool
IsVariableStr determines whether the VarLenType is a string.
type Version ¶
Version represents the currently used hdf5 library version
func LibVersion ¶
LibVersion returns version information for the HDF5 library.