develooper Front page | perl.perl6.language | Postings from October 2001

Re: TIMTOWT concat / hypo-operators

Thread Previous
From:
Edwin Steiner
Date:
October 7, 2001 03:49
Subject:
Re: TIMTOWT concat / hypo-operators
Message ID:
8zensp3x.fsf@gmx.net
edwin.steiner@gmx.net (Edwin Steiner) writes:
> 	    @score +=^ (4,1) *^ @points;

Sorry, I completely f...ed up the example.
What I was thinking of would be more like:

	$score +=^ (4,1) ^* @points;

So one hypo- and one hyper-operator.
Assuming @points is 2-dimensional this would:

1) multiply @points element-wise by the matrix
	4 1 1 ...
	4 1 1 ...
	4 1 1 ...
	...   ...

2) add the sum of all elements of the resulting matrix
  to score.

-Edwin


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About