矩阵定义
Dim Jm,Tm,Zm As New List(Of List(Of Integer))
Dim J0,T0 As List(Of Integer)
Dim sz() As Integer
sz = New Integer() { 3,1,2,3,4,0,0,0 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 1,4,2,3,0,0,0,0 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 3,4,1,2,1,0,0,0 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 2,3,4,1,4,3,0,0 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 4,2,3,4,1,3,4,0 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 1,2,1,3,4,1,3,1 }:J0 = New List(Of Integer):J0.AddRange(sz):Jm.Add(J0)
sz = New Integer() { 8,2,4,24,6,0,0,0 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
sz = New Integer() { 4,5,3,4,0,0,0,0 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
sz = New Integer() { 3,7,15,20,8,0,0,0 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
sz = New Integer() { 7,6,21,1,16,3,0,0 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
sz = New Integer() { 10,4,8,4,12,6,1,0 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
sz = New Integer() { 1,4,7,3,5,2,5,8 }:T0 = New List(Of Integer):T0.AddRange(sz):Tm.Add(T0)
矩阵运算
For x As Integer = 0 To Jm.Count - 1
Dim Z0 As List(Of Integer)
For y As Integer = 0 To Jm(x).Count - 1
Z0.Add(Jm(x)(y)*Tm(x)(y))
Next
Zm.Add(Z0)
Next
[此贴子已经被作者于2016/7/29 11:21:24编辑过]