.NET Framework
|
|
 |

|
See here[^] and here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Member 9405140 wrote: there any app which is not existing in android and research is going on.
Well...this is a .Net forum, so No.
|
|
|
|

|
For love nor money I cannot get the syntax right.
I want to return 3 x 2D arrays from a function but can't wrap my head around it - I suspect I have just failed to grasp some fundamental aspect of jagged arrays!
Public Function SVD() As Double(,)(,)(,)
Dim arS(,) As Double
Dim arU(,) As Double
Dim arV(,) As Double
...Fill the Arrays...
Dim arSVD(,)(,)(,) As Double
arSVD(0) = arS
arSVD(1) = arU
arSVD(2) = arV
Return arSVD
End Function
If I have it that way the error is on arSVD(n) and says 'Number of indices is less than the number of dimensions...'
If I change the return type and arSVD to Double()()() then the error is on the last arS and says 'Value of type 2D array cannot be converted to 1D array...'
If I change it to arSVD(0,0) for example the error is on the last arS and says 'Value of type 2D array cannot be converted to type 2D array of 2D array...'
Bash. Head. Brick. Wall.
Any help very gratefully received.
Mike
|
|
|
|

|
Wow, I'd forgotten just how horrible VB's array syntax[^] is!
Try this:
Public Function SVD() As Double()(,)
Dim arS(,) As Double
Dim arU(,) As Double
Dim arV(,) As Double
Dim arSVD(2)(,) As Double
arSVD(0) = arS
arSVD(1) = arU
arSVD(2) = arV
Return arSVD
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
modified 5 Oct '12 - 12:50.
|
|
|
|

|
Thanks, Richard.
Quite why I couldn't work out ()(,) I don't know, so simple when you know!
I blame VB array syntax too
That link should be VB arrays[^]
Mike
|
|
|
|

|
Probably also worth noting, for posterity, that I solved this problem using a structure, 3 private members as double(,) and a constructor that takes the same as paramaters and off you go - quite a few advantages of doing it this way and I could also add a second constructor using just one parameter, the syntax Richard gave : ()(,) as double.
|
|
|
|
|

|
Why are you asking the same question again? If you have posted this duplicate question by mistake, please delete this question and wait for people to answer your original question.
|
|
|
|
|

|
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
iam getting the above error in my site please help me.
sandeep
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin