Skip to content

Instantly share code, notes, and snippets.

@dj1711572002
Created August 26, 2020 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dj1711572002/fad0d2250d4d1c45c992651fc352ecba to your computer and use it in GitHub Desktop.
Save dj1711572002/fad0d2250d4d1c45c992651fc352ecba to your computer and use it in GitHub Desktop.
VB.NET MatrixLibraryTest_ImagingsolutionLibrary_Test00
Imports ImagingSolution 'ImagingSolution.Matクラス用
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'========matA====================
Dim matA(2, 2) As Double
matA(0, 0) = 1
matA(0, 1) = 2
matA(0, 2) = 3
matA(1, 0) = 4
matA(1, 1) = 5
matA(1, 2) = 6
matA(2, 0) = 7
matA(2, 1) = 8
matA(2, 2) = 9
matA.Print("matA =") ' コンソールへ行列の表示
'============matB=================
Dim matB(2, 2) As Double
matB(0, 0) = 1
matB(0, 1) = 4
matB(0, 2) = 8
matB(1, 0) = 6
matB(1, 1) = 2
matB(1, 2) = 5
matB(2, 0) = 9
matB(2, 1) = 7
matB(2, 2) = 3
matB.Print("matB =") ' コンソールへ行列の表示
'===========行列(matA)と行列(matA)の積======
Dim matMult = matA.Mult(matB)
matMult.Print("matA matB =")
'===========行列(matA)と行列(matA)の加算======
Dim matAdd = matA.Add(matB)
matAdd.Print("matA + matB =")
'===========行列(matA)と行列(matA)の減算======
Dim matSub = matA.Sub(matB)
matSub.Print("matA - matB =")
'===========行列(matB)の逆行列=============
Dim matInverse = matB.Inverse()
matInverse.Print("(matB)-1 =")
'===========行列(matA)の転置==============
matA.Print("matA =") ' コンソールへ行列の表示
Dim matTranspose = matA.Transpose()
matTranspose.Print("(matA)T =")
'===========回転行列の取得=================
Dim matRotate = Mat.RotateMat(10.0)
matRotate.Print("RotateMat =")
'===========拡大行列の取得=================
Dim matScale = Mat.ScaleMat(2.0, 5.0)
matScale.Print("ScaleMat =")
'===========平行移動行列の取得==============
Dim matTranslate = Mat.TranslateMat(-5.0, 12.0)
matTranslate.Print("TranslateMat =")
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment