/// <summary> /// Create mapping index - assumes that matrices are square and uses first dimension as the map size /// </summary> /// <typeparam name="T"></typeparam> /// <param name="tazEquiv">array the size of the matrix table dimension</param> /// <param name="mapDataType">Data type of array</param> /// <param name="mapName">Name of index map</param> public void CreateMapping <T>(T[] tazEquiv, H5DataTypeId mapDataType, string mapName) { long[] oneDShape = { Shape[0] }; H5DataSpaceId mapSpaceId = H5S.create_simple(1, oneDShape); H5DataSetId newMappingID = H5D.create(luGroup, mapName, mapDataType, mapSpaceId); H5D.write(newMappingID, mapDataType, new H5Array <T>(tazEquiv)); IndexMapNames.Add(mapName); NumIndexMap++; this.indexMaps.Add(mapName, newMappingID); }
private bool getOMXIndexMaps() { this.luGroup = H5G.open(fileId, luGroupName); this.NumIndexMap = (int)H5G.getNumObjects(this.luGroup); this.IndexMapNames = new List <string>(); for (int i = 0; i < NumIndexMap; i++) { string imName = H5G.getObjectNameByIndex(this.luGroup, (ulong)i); IndexMapNames.Add(imName); H5DataSetId imId = H5D.open(luGroup, imName); indexMaps.Add(imName, imId); } return(true); }