Matrix multiplication code (://URLFAN)

How popular is your website?  
Enter a website above, we'll show you who's talking about it right now.
We're currently ranking the popularity of 3,783,534 websites by parsing 124,944,128 blog posts from 2,072,951 blog feeds.
Article Structure
7 paragraphs
4079 characters
6 images
5 outgoing links

Matrix multiplication code

Post Date: Aug 20, 2008 2:00 a.m.
Ranked website: polymathprogrammer.com (Ranks #404997 of 3,783,534)

For full text please visit source:
http://feeds.feedburner.com/~r/PolymathProgrammer/~3/369807350/


The following code is to illustrate the matrix multiplication method mentioned previously. For simplicity sake, I’m limiting the size of the matrices to 3. const int cnSize = 3; int[,] A = new int[cnSize, cnSize]; int[,] B = new int[cnSize, cnSize]; int[,] C = new int[cnSize, cnSize]; int[] x = new int[cnSize]; int[] y = new int[cnSize]; Random rand = new Random(); int i, j, k; // fill matrix and vector with random values for (i = 0; i < cnSize; ++i) { for (j = 0; j < cnSize; ++j) { A[i, j] = rand.Next(1, 10); B[i, j] = rand.Next(1, 10); } x[i] = rand.Next(1, 10); } // matrix-vector multiplication for (i = 0; i < cnSize; ++i) { y[i] = 0; for (k = 0; k < cnSize; ++k) { y[i] += A[i, k] * x[k]; } } // matrix-matrix multiplication for (i = 0; i < cnSize; ++i) { for (j = 0; j < cnSize; ++j) { C[i, j] = 0; for (k =...

Content suppressed by ://URLFAN, for full article visit source

Websites mentioned in article
(click for rank details):

polymathprogrammer.com
creativecommons.org

Buzz Words mentioned in article:

Console WriteLine
How popular is feeds.feedburner.com?

Click here to view stats and graphs for polymathprogrammer.com


Related archived posts

Peter Gillard-Moss: Examples as tests
From: feeds.feedburner.com
Post Date: 2008-12-01 05:26:00

We often talk about tests being documentation but what about using tests for usage examples for APIs? It’s something I rarely (if ever) see and yet tests are far more succint and effecient at communicating behaviour. To demonstrate this I am going to take a very simple function from MSDN on the C# ++ operator . Here is the extract of MS’ example: The increment operator (++) increments its operand by 1. The increment operator can appear before or after its operand: Remarks... more
Peter Gillard-Moss: Examples as tests
From: jupitermoonbeam.blogspot.com
Post Date: 2008-12-01 05:26:00

We often talk about tests being documentation but what about using tests for usage examples for APIs? It’s something I rarely (if ever) see and yet tests are far more succint and effecient at communicating behaviour. To demonstrate this I am going to take a very simple function from MSDN on the C# ++ operator . Here is the extract of MS’ example: The increment operator (++) increments its operand by 1. The increment operator can appear before or after its operand: Remarks The fi... more


More posts from feeds.feedburner.com

Practical Programming (part 1)
From: feeds.feedburner.com
Post Date: 2007-12-06 17:00:07

There are many factors affecting the success of a software project. Amongst them, we have Skill level of individuals (from manager to coder) Time involved Tools involved Project complexity and probably many more you can add. So how can you successfully complete a project practically ? How can you balance customer satisfaction, code quality, time constraints and other factors in the most efficient and practical manner? I was intrigued to explore this when one person asked how ca... more
Audio Player plugin settings
From: feeds.feedburner.com
Post Date: 2007-12-04 17:00:30

I was just playing around with the Audio Player plugin for my first podcast . On the day of the post, I was a bit nervous, because I’ve never done a podcast before, and I didn’t know how it would look in an RSS feed reader. So I subscribed to my own feed to make sure. It was a good thing I did. At the appointed time, I awaited eagerly, earnestly, even ecstatically. No post in my feed reader. Oh no. Ok, maybe FeedBurner was a little slow. So I waited a little longer. 60 agonis... more
Can your program survive reruns?
From: feeds.feedburner.com
Post Date: 2007-12-02 17:00:55

The ability to perform repetitive tasks in the exact same manner every time is one of the key advantages of a computer. Programs are written to behave in the exact same manner every time they’re run. Yet sometimes, they don’t. So the question is, do you write code such that your program can survive rerunning itself? What I mean is, if your program somehow fails, can it be rerun with minimal fuss on your part? The database equivalent is the transaction. Within a transaction, any ... more
Christmas office decoration
From: feeds.feedburner.com
Post Date: 2007-12-02 16:45:21

It’s about 3 weeks till Christmas and decorations are going up. Shopping centres and malls are decorating. Orchard Road (a major stretch of shopping venues in Singapore) is being decorated. Why not offices? So my colleague took it upon herself as master decorator and whipped out her secret stash of decorabilia, and enlisted the help of another colleague and myself to help deck our portion of office space. So here’s the obligatory Christmas tree She decided to spruce... more


Feeds and posts are not affliated with ://URLFAN. They are displayed here simply for informational purposes, if you would like to remove your feed, posts, or domain from ranking and analysis, please contact us.

© 2006-2008 ://URLFAN (Server 202 Generated Dec 01 08 10:16 in -0.60 secs.)

Contact Us / About ://URLFAN / Notify me when my site is added or updated. / Add my RSS feed to ://URLFAN