Test Matrix Multiplication on MathNet.Numerics

Imports MathNet.Numerics

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim startTime As DateTime = DateTime.Now
Dim a As MathNet.Numerics.LinearAlgebra.Double.Matrix

a = MathNet.Numerics.LinearAlgebra.Double.DenseMatrix.Create(3000, 3000, 2.0)

Dim b As MathNet.Numerics.LinearAlgebra.Double.Matrix

b = MathNet.Numerics.LinearAlgebra.Double.DenseMatrix.Create(3000, 3000, 1.5)

Dim c As MathNet.Numerics.LinearAlgebra.Double.Matrix

c = a.Multiply(b)

Dim endTime As DateTime = DateTime.Now

Dim runTime As TimeSpan = endTime.Subtract(startTime)

MessageBox.Show(“Start Time: ” & startTime & vbNewLine & “End Time: ” & endTime & vbNewLine & “Run Time: ” & runTime.Minutes & ” minutes, ” & runTime.Seconds & ” seconds”, “Time used”)

MessageBox.Show(c.ToString)
End Sub
End Class

Advertisements

About Qiusheng Wu

Assistant Professor of Geography at Binghamton University, State University of New York

Posted on March 24, 2014, in Algorithms, Tutorials. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

REDD+ for the Guiana Shield

Technical Cooperation Project

LidarBlog.com

Dr. Qiusheng Wu @ SUNY Binghamton

Writing Science

How to write papers that get cited and proposals that get funded

GIS In Ecology

Providing Training, Advice And Consultation On The Use Of GIS In Ecology

metrhispanic

On cities, land, ...

GeoAcademy

Open GIS: No Bounds

Scientia Plus Conscientia

Thoughts on Science and Nature

r4hydrology

Learning hydrology with R

Karl Hennermann

GIS at the University of Manchester

GIS and Science

Applications of geospatial technology for scientific research and understanding.

GISblog.com

GIS, Mapping, Remote Sensing, Geodata, Geospatial news

Whitebox Geospatial Analysis Tools

Open-source GIS development and spatial analysis with Whitebox GAT

TopoToolbox

MATLAB-based software for topographic analysis

Anything Geospatial – AnyGeo

Dr. Qiusheng Wu @ SUNY Binghamton

GeospatialPython.com

Dr. Qiusheng Wu @ SUNY Binghamton

Another GIS Blog

Dr. Qiusheng Wu @ SUNY Binghamton

ArcPy Café

Get all your ArcGIS Python Recipes here!

Planet Python

Dr. Qiusheng Wu @ SUNY Binghamton

%d bloggers like this: