diff --git a/Data_science/MachineLearning/DeepLearning/RNN/CharRNN.vb b/Data_science/MachineLearning/DeepLearning/RNN/CharRNN.vb index 3c9371460..161beb08a 100644 --- a/Data_science/MachineLearning/DeepLearning/RNN/CharRNN.vb +++ b/Data_science/MachineLearning/DeepLearning/RNN/CharRNN.vb @@ -93,13 +93,18 @@ Namespace RNN End If End Function - ' Trains the network. + ''' + ''' Trains the network. + ''' + ''' + ''' + ''' Public Shared Sub train(options As Options, net As CharLevelRNN, snapshotName As String) ' Load the training set. Dim trainingSet = StringTrainingSet.fromFile(options.inputFile) - Console.WriteLine("Data size: " & trainingSet.size().ToString() & ", vocabulary size: " & trainingSet.vocabularySize().ToString()) + VBDebugger.EchoLine("Data size: " & trainingSet.size().ToString() & ", vocabulary size: " & trainingSet.vocabularySize().ToString()) ' Initialize the network and its trainer. @@ -158,16 +163,12 @@ Namespace RNN End While End Sub - ' Saves a network snapshot with this name to file. + ''' + ''' Saves a network snapshot with this name to file. + ''' + ''' + ''' Public Shared Sub saveASnapshot(name As String, net As CharLevelRNN) - If ReferenceEquals(name, Nothing) Then - Throw New NullReferenceException("Network name can't be null.") - End If - - If net Is Nothing Then - Throw New NullReferenceException("Network can't be null.") - End If - ' Take a snapshot Try Using str As FileStream = New FileStream(name & ".snapshot", FileMode.Create, FileAccess.Write) @@ -188,10 +189,6 @@ Namespace RNN ''' ''' Public Shared Function loadASnapshot(name As String) As CharLevelRNN - If ReferenceEquals(name, Nothing) Then - Throw New NullReferenceException("Name can't be null.") - End If - Dim net As CharLevelRNN = Nothing ' Load the snapshot diff --git a/Data_science/MachineLearning/DeepLearning/RNN/net/StringTrainingSet.vb b/Data_science/MachineLearning/DeepLearning/RNN/net/StringTrainingSet.vb index ab4599a95..188a212e1 100644 --- a/Data_science/MachineLearning/DeepLearning/RNN/net/StringTrainingSet.vb +++ b/Data_science/MachineLearning/DeepLearning/RNN/net/StringTrainingSet.vb @@ -63,6 +63,7 @@ Namespace RNN ' Immutable training set for a character level RNN. Public Class StringTrainingSet Implements TrainingSet + Private dataField As String ' Data from file. Private alphabetField As Alphabet ' Alphabet extracted from data. diff --git a/Data_science/MachineLearning/DeepLearning/RNN/net/interfaces/Trainable.vb b/Data_science/MachineLearning/DeepLearning/RNN/net/interfaces/Trainable.vb index 391941037..6f6bfcde2 100644 --- a/Data_science/MachineLearning/DeepLearning/RNN/net/interfaces/Trainable.vb +++ b/Data_science/MachineLearning/DeepLearning/RNN/net/interfaces/Trainable.vb @@ -1,59 +1,62 @@ #Region "Microsoft.VisualBasic::5b68e0afbe63fac08c109499e401e6b1, Data_science\MachineLearning\DeepLearning\RNN\net\interfaces\Trainable.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - - ' Code Statistics: - - ' Total Lines: 17 - ' Code Lines: 5 (29.41%) - ' Comment Lines: 9 (52.94%) - ' - Xml Docs: 0.00% - ' - ' Blank Lines: 3 (17.65%) - ' File Size: 487 B - - - ' Interface Trainable - ' - ' Function: forwardBackward - ' - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + + +' Code Statistics: + +' Total Lines: 17 +' Code Lines: 5 (29.41%) +' Comment Lines: 9 (52.94%) +' - Xml Docs: 0.00% +' +' Blank Lines: 3 (17.65%) +' File Size: 487 B + + +' Interface Trainable +' +' Function: forwardBackward +' +' +' /********************************************************************************/ #End Region Namespace RNN - ' Trainable neural network. + + ''' + ''' Trainable neural network. + ''' Public Interface Trainable ' @@ -65,7 +68,7 @@ Namespace RNN ' Returns the cross-entropy loss. ' Function forwardBackward(ix As Integer(), iy As Integer()) As Double - End Interface + End Interface End Namespace diff --git a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Render2D/RenderShape.vb b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Render2D/RenderShape.vb index 193ac4af1..61f543406 100644 --- a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Render2D/RenderShape.vb +++ b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Render2D/RenderShape.vb @@ -56,6 +56,7 @@ Imports System.Drawing Imports System.Drawing.Drawing2D +Imports std = System.Math Namespace Drawing2D @@ -69,14 +70,22 @@ Namespace Drawing2D Return s.shape End Operator +#If NET48 Then Shared ReadOnly boidArrow As Point() = New Point() { New Point(0, 0), New Point(-4, -1), New Point(0, 8), New Point(4, -1), New Point(0, 0) } -#If NET48 Then #Disable Warning + ''' + ''' Arrow drawing for the winform application + ''' + ''' + ''' + ''' + ''' + ''' Public Shared Sub RenderBoid(gfx As Graphics, x As Single, y As Single, angle As Single, color As Color) Using brush = New SolidBrush(color) gfx.TranslateTransform(x, y) @@ -87,5 +96,43 @@ Namespace Drawing2D End Sub #Enable Warning #End If + + ''' + ''' Arrow drawing for the .net core console application + ''' + Public Shared Sub RenderBoid(gfx As IGraphics, x As Single, y As Single, vx As Single, vy As Single, color As Color, + Optional l As Single = 8, + Optional w As Single = 3) + ' 计算单位方向向量 + Dim length As Single = std.Sqrt(vx * vx + vy * vy) + Dim ux As Single = vx / length + Dim uy As Single = vy / length + + ' 计算箭头的终点 + Dim endX As Single = x + l * ux + Dim endY As Single = y + l * uy + + ' 定义箭头的头部大小 + Dim arrowHeadSize As Single = 10 + + ' 计算箭头两翼的顶点 + Dim wing1X As Single = endX - arrowHeadSize * uy + Dim wing1Y As Single = endY + arrowHeadSize * ux + Dim wing2X As Single = endX - arrowHeadSize * uy + Dim wing2Y As Single = endY - arrowHeadSize * ux + + ' 绘制箭身 + Call gfx.DrawLine(Pens.Black, x, y, endX, endY) + + ' 定义三角形的三个顶点 + Dim points As PointF() = { + New PointF(endX, endY), + New PointF(wing1X, wing1Y), + New PointF(wing2X, wing2Y) + } + + ' 绘制实心黑色三角形作为箭头 + Call gfx.FillPolygon(Brushes.Black, points) + End Sub End Class End Namespace diff --git a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Shape.vb b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Shape.vb index d68ff7b06..2d165de88 100644 --- a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Shape.vb +++ b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Shape.vb @@ -61,8 +61,11 @@ Imports Microsoft.VisualBasic.Imaging Namespace Drawing2D.Shapes ''' - ''' An abstract shape element with layout information data.(矢量图形) + ''' An abstract shape element with layout information data. ''' + ''' + ''' (矢量图形) + ''' Public MustInherit Class Shape ''' diff --git a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Triangle.vb b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Triangle.vb index 9d879b8bc..7b80a1f6c 100644 --- a/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Triangle.vb +++ b/gr/Microsoft.VisualBasic.Imaging/Drawing2D/Shapes/Triangle.vb @@ -75,6 +75,26 @@ Namespace Drawing2D.Shapes Public Property Vertex3 As PointF Public Property Angle As Single + ' vertex1 + ' / \ + ' vertex2 -- vertex3 + + ''' + ''' get the possible shape size of the triangle shape object + ''' + ''' + ''' width is the delta of the vertex2 and vertex3 x location; + ''' height is the delta of the vertex1 with mean of vertex2 and vertex3 y location value. + ''' + Public Overrides ReadOnly Property Size As SizeF + Get + Dim height As Double = Vertex1.Y - (Vertex2.Y + Vertex3.Y) / 2 + Dim width As Double = Vertex3.X - Vertex2.X + + Return New SizeF(width, height) + End Get + End Property + Sub New(Location As Point, Color As Color) Call MyBase.New(Location) Me.Color = Color @@ -85,6 +105,10 @@ Namespace Drawing2D.Shapes Me.Color = Color End Sub + Sub New() + Call MyBase.New(Nothing) + End Sub + ''' ''' 直角三角形 ''' @@ -94,12 +118,6 @@ Namespace Drawing2D.Shapes Throw New NotImplementedException End Function - Public Overrides ReadOnly Property Size As SizeF - Get - Throw New NotImplementedException - End Get - End Property - ''' ''' ''' diff --git a/gr/physics.sln b/gr/physics.sln index bc41b68ba..3a9a5206b 100644 --- a/gr/physics.sln +++ b/gr/physics.sln @@ -19,6 +19,8 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "imaging.NET5", "Microsoft.V EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "graph-netcore5", "..\Data_science\Graph\graph-netcore5.vbproj", "{3DB1DA39-EF73-4BF4-BB20-0E9AEDC4A900}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Drawing-net4.8", "Drawing-net4.8\Drawing-net4.8.vbproj", "{03BAF13D-3F53-48ED-B97F-A7ED936DF01E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Biodeep_UNIX_x64|Any CPU = Biodeep_UNIX_x64|Any CPU @@ -1238,6 +1240,168 @@ Global {3DB1DA39-EF73-4BF4-BB20-0E9AEDC4A900}.Yilia-Release_x64|x64.Build.0 = Release|x64 {3DB1DA39-EF73-4BF4-BB20-0E9AEDC4A900}.Yilia-Release_x64|x86.ActiveCfg = Release|Any CPU {3DB1DA39-EF73-4BF4-BB20-0E9AEDC4A900}.Yilia-Release_x64|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep_UNIX_x64|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biodeep|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Biostack-Debug|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Debug|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.DEMO|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Docker|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.docs|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(Release_X64)|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GCModeller(UNIX-Release_X64)|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.gcmodeller_desktop|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.GTA5-game-test|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.installer_x64|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.LipidSearch|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mysqli_X64_release|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit_win32|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.mzkit|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|Any CPU.ActiveCfg = nuget_release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|Any CPU.Build.0 = nuget_release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|x64.ActiveCfg = nuget_release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|x64.Build.0 = nuget_release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|x86.ActiveCfg = nuget_release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.NPSearch|x86.Build.0 = nuget_release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.PlantMAT|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.ProteoWizard.d|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Publish|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Release2|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Rsharp_app_release|x86.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.sciBASIC.NET-test-release|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|Any CPU.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|Any CPU.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|x64.ActiveCfg = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|x64.Build.0 = Debug|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|x86.ActiveCfg = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Surveillance-of-infectious-diseases|x86.Build.0 = Debug|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|Any CPU.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|Any CPU.Build.0 = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|x64.ActiveCfg = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|x64.Build.0 = Release|x64 + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|x86.ActiveCfg = Release|Any CPU + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E}.Yilia-Release_x64|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1248,6 +1412,7 @@ Global {BC196690-17BB-4562-A209-A05E197320BC} = {AFCC8068-49D2-4A75-80AB-22055703DD48} {5F018723-06F2-434F-8D89-BA1CF6766F01} = {AFCC8068-49D2-4A75-80AB-22055703DD48} {3DB1DA39-EF73-4BF4-BB20-0E9AEDC4A900} = {AFCC8068-49D2-4A75-80AB-22055703DD48} + {03BAF13D-3F53-48ED-B97F-A7ED936DF01E} = {AFCC8068-49D2-4A75-80AB-22055703DD48} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6398F1C0-7A2F-4ABF-A31F-268FC9F34B72} diff --git a/gr/physics/Boids/Boid.vb b/gr/physics/Boids/Boid.vb index 5efd337c8..853ce5472 100644 --- a/gr/physics/Boids/Boid.vb +++ b/gr/physics/Boids/Boid.vb @@ -118,8 +118,12 @@ Namespace Boids Return angle End Function + ''' + ''' Velocity + ''' + ''' Public Function GetSpeed() As Double - Return std.Sqrt(Xvel * Xvel + Yvel * Yvel) + Return std.Sqrt(Xvel ^ 2 + Yvel ^ 2) End Function End Class End Namespace diff --git a/gr/physics/physics_Test/Form1.vb b/gr/physics/physics_Test/Form1.vb index 5aebeae6a..276b32e1b 100644 --- a/gr/physics/physics_Test/Form1.vb +++ b/gr/physics/physics_Test/Form1.vb @@ -1,58 +1,59 @@ #Region "Microsoft.VisualBasic::cbde8d34e78df619f3e26774bab577d4, gr\physics\physics_Test\Form1.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - - ' Code Statistics: - - ' Total Lines: 51 - ' Code Lines: 38 (74.51%) - ' Comment Lines: 0 (0.00%) - ' - Xml Docs: 0.00% - ' - ' Blank Lines: 13 (25.49%) - ' File Size: 1.95 KB - - - ' Class Form1 - ' - ' Sub: Form1_Load, Updates - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + + +' Code Statistics: + +' Total Lines: 51 +' Code Lines: 38 (74.51%) +' Comment Lines: 0 (0.00%) +' - Xml Docs: 0.00% +' +' Blank Lines: 13 (25.49%) +' File Size: 1.95 KB + + +' Class Form1 +' +' Sub: Form1_Load, Updates +' +' /********************************************************************************/ #End Region Imports System.Drawing Imports System.Threading +Imports Microsoft.VisualBasic.Drawing Imports Microsoft.VisualBasic.Imaging Imports Microsoft.VisualBasic.Imaging.Physics Imports Microsoft.VisualBasic.Language diff --git a/gr/physics/physics_Test/Form3.vb b/gr/physics/physics_Test/Form3.vb index 6e9675df7..e5c540751 100644 --- a/gr/physics/physics_Test/Form3.vb +++ b/gr/physics/physics_Test/Form3.vb @@ -59,6 +59,7 @@ #End Region Imports System.Drawing +Imports Microsoft.VisualBasic.Drawing Imports Microsoft.VisualBasic.Imaging Imports Microsoft.VisualBasic.Imaging.Drawing2D.Colors Imports Microsoft.VisualBasic.Imaging.Physics @@ -325,7 +326,7 @@ Public Module FluidRender Dim maxV As Double = Aggregate p In container.Entity Into Max(p.velocity.magnitude) Dim minV As Double = 0 - Using gfx As Graphics = Graphics.FromImage(bmp) + Using gfx As IGraphics = Graphics2D.Open(bmp) Call gfx.Clear(Color.Black) For Each p In container.Entity @@ -337,7 +338,7 @@ Public Module FluidRender level = colors.Length - 1 End If - Call gfx.DrawCircle(p.position, particleSize, colors(level)) + Call gfx.DrawCircle(CType(p.position, PointF), particleSize, colors(level)) Next Return bmp diff --git a/gr/physics/physics_Test/Form4.vb b/gr/physics/physics_Test/Form4.vb index af5d10134..9ccdde607 100644 --- a/gr/physics/physics_Test/Form4.vb +++ b/gr/physics/physics_Test/Form4.vb @@ -71,6 +71,7 @@ Imports System.Drawing Imports System.Math +Imports Microsoft.VisualBasic.Drawing Imports Microsoft.VisualBasic.Imaging Imports Microsoft.VisualBasic.Imaging.Physics Imports Microsoft.VisualBasic.MIME.Html.CSS @@ -447,7 +448,7 @@ Public Class Form4 Sub draw() Dim bmp As New Bitmap(Canvas.Width, Canvas.Height) - Dim gfx As Graphics = Graphics.FromImage(bmp) + Dim gfx As IGraphics = Graphics2D.Open(bmp) Dim nr As Integer = 0 For i As Integer = 0 To numParticles - 1 diff --git a/gr/physics/physics_Test/label_layout_test.vb b/gr/physics/physics_Test/label_layout_test.vb index 7798d436c..b71784ebe 100644 --- a/gr/physics/physics_Test/label_layout_test.vb +++ b/gr/physics/physics_Test/label_layout_test.vb @@ -1,58 +1,59 @@ #Region "Microsoft.VisualBasic::df3efb65f4f18d5c9c0f6e65fd683cfa, gr\physics\physics_Test\label_layout_test.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - - ' Code Statistics: - - ' Total Lines: 68 - ' Code Lines: 50 (73.53%) - ' Comment Lines: 0 (0.00%) - ' - Xml Docs: 0.00% - ' - ' Blank Lines: 18 (26.47%) - ' File Size: 2.62 KB - - - ' Module label_layout_test - ' - ' Sub: Main - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + + +' Code Statistics: + +' Total Lines: 68 +' Code Lines: 50 (73.53%) +' Comment Lines: 0 (0.00%) +' - Xml Docs: 0.00% +' +' Blank Lines: 18 (26.47%) +' File Size: 2.62 KB + + +' Module label_layout_test +' +' Sub: Main +' +' /********************************************************************************/ #End Region Imports System.Drawing Imports Microsoft.VisualBasic.ComponentModel.Ranges.Model +Imports Microsoft.VisualBasic.Drawing Imports Microsoft.VisualBasic.Imaging Imports Microsoft.VisualBasic.Imaging.Math2D Imports Microsoft.VisualBasic.Imaging.Physics.layout diff --git a/gr/physics/physics_Test/physics_Test.vbproj b/gr/physics/physics_Test/physics_Test.vbproj index b96f759b0..4d4c76d7a 100644 --- a/gr/physics/physics_Test/physics_Test.vbproj +++ b/gr/physics/physics_Test/physics_Test.vbproj @@ -195,6 +195,10 @@ {bc196690-17bb-4562-a209-a05e197320bc} html_netcore5 + + {03baf13d-3f53-48ed-b97f-a7ed936df01e} + Drawing-net4.8 + {5f018723-06f2-434f-8d89-ba1cf6766f01} imaging.NET5