c# - Mapping Vectors -


Is vector a good way to map? Here's an example of what I mean:

  vec0 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ] VC1 = [1,4, 2,7,3,2] VC2 = [0,0,0,0,0,0,0,0,0,0,0,0,0] VC2 = [7,2] , 7, 9, 9, 6, 1, 4, 4] Vec4 = [0,0,0,0,0,0,0,0] mainwave = [0,0,0,0,0,0,0,0,0 , 0,0,0,0,0,1,1,1,4,2,7,3, 2,0,0,0,0,0,0,0,0,0,7,7,2,7,9,0 , 9,6,1,0,4,0,0,0,0,0,0,0]  

We say mainvec is not present (I'm just showing it to you So that you can keep in mind the general data structure.

Now to say that I want mainvec (12) that will be 4. What is a good way to call these Vectors, Have you ever seen a statement in the main vector? I think if the statement, which tests the index of the main point and I can then offset every call, where the call is within one of the vectors, for example:

Which I (index> = 13) vect1 (index 11);

/ Pre>

I wonder if someone is short if the way to do this without the statement. Any ideas?

Are you looking for something like that?

  By using the system. Colllections.Generic; Namespace test {class program {static zero main (string [] args) {int [] vec0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Int [] vec1 = {1, 4, 2, 7, 3, 2}; Int [] vec2 = {0, 0, 0, 0, 0, 0, 0, 0, 0}; Int [] vec3 = {7, 2, 7, 9, 9, 6, 1, 0, 4}; Int [] vec4 = {0, 0, 0, 0, 0, 0}; & Lt; Integer & gt; Temp = new list & lt; Int & gt; (); Temp.AddRange (vec0); Temp.AddRange (vec1); Temp.AddRange (vec2); Temp.AddRange (vec3); Temp.AddRange (vec4); Int [] mainvec = temp.ToArray (); }}}  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -