matrix regedit
Продажи по всей России
Москва
+7 (495) 649-86-94
Санкт-Петербург
Екатеринбург
Ростов-на-Дону
Нижний Новгород
Смотреть все контакты
matrix regedit

HKEY_CURRENT_USER\Software\MyMatrix row0 (key) col0 = 1 (REG_DWORD) col1 = 2 (REG_DWORD) col2 = 3 (REG_DWORD) row1 col0 = 4 col1 = 5 col2 = 6 This is intuitive but creates many keys; poor for large matrices. 4.1 Using PowerShell (Binary Matrix Example) # Write a 2x3 float matrix to registry $path = "HKCU:\Software\MatrixDemo" New-Item -Path $path -Force | Out-Null $rows = 2 $cols = 3 $data = @(1.0, 2.0, 3.0, 4.0, 5.0, 6.0) $bytes = [System.Collections.ArrayList]::new() $bytes.AddRange([BitConverter]::GetBytes($rows)) $bytes.AddRange([BitConverter]::GetBytes($cols)) foreach ($val in $data) $bytes.AddRange([BitConverter]::GetBytes([float]$val))

"rows": 3, "cols": 3, "data": [[1,2,3],[4,5,6],[7,8,9]]

Value: 02 00 00 00 03 00 00 00 00 00 80 3F 00 00 00 40 00 00 40 40 00 00 80 40 00 00 A0 40 00 00 C0 40 Interpretation: - rows = 2 (little-endian) - cols = 3 - data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] as float32 Store matrix as JSON string in REG_SZ .

Example: 2×3 matrix of 32-bit floats (24 bytes data + 8 header = 32 bytes total).

Set-ItemProperty -Path $path -Name "MatrixBinary" -Value ([byte[]]$bytes) -Type Binary $readBytes = (Get-ItemProperty -Path $path -Name "MatrixBinary").MatrixBinary $rowsRead = [BitConverter]::ToInt32($readBytes, 0) $colsRead = [BitConverter]::ToInt32($readBytes, 4) $matrix = @() for ($i = 0; $i -lt $rowsRead * $colsRead; $i++) $offset = 8 + $i * 4 $matrix += [BitConverter]::ToSingle($readBytes, $offset)

[rows:4 bytes][cols:4 bytes][data: rows×cols × element_size]

RegSetValueExW(hKey, valueName, 0, REG_BINARY, buffer.data(), (DWORD)totalSize); RegCloseKey(hKey); Logical naming prevents collision and improves readability.

matrix regeditнаписать в телеграм
Оплачен счет:

Волгоградская обл., гор. Котельниково; "Освещения предзаводской территории завода миниральных удобрений ЕвроХим-ВолгаКалий"; опоры Valmont Galaxie P6.

995