mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-09-10, 00:56   #1387
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Yes, it *is* rather complex. But it's easier than the final project, and should be good practice. Also, you could do it -- not that it would be easy, but with how far you've come I have no doubt.

I like how this can be used in DNA stuff I may use that part again lol

FaR was a change in mindset I saw this mentally:

Replacement
\down
Start + Word_to Change + Finish
\down


but really my code now does:


Repeat(up_to_Change + Replacement\rightVariable\rightprint(variable))
print(up_to_change)
science_man_88 is offline   Reply With Quote
Old 2010-09-10, 14:25   #1388
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Yes, it *is* rather complex. But it's easier than the final project, and should be good practice. Also, you could do it -- not that it would be easy, but with how far you've come I have no doubt.
I guessing looking for x spaces and reading it into c would help in one sense then knock off the first word and replace it with the next one.
science_man_88 is offline   Reply With Quote
Old 2010-09-10, 18:52   #1389
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

is there a way to shift Vec of Vec like vectors ? if so that may come in handy.
science_man_88 is offline   Reply With Quote
Old 2010-09-10, 19:53   #1390
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175B16 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
is there a way to shift Vec of Vec like vectors ? if so that may come in handy.
You can make a vector of vectors, if you like... is that what you're asking?
CRGreathouse is offline   Reply With Quote
Old 2010-09-10, 20:38   #1391
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
You can make a vector of vectors, if you like... is that what you're asking?
I know you can make Vec(Vec(),Vec())... but can you alter them by shifting like vectors can do ?
science_man_88 is offline   Reply With Quote
Old 2010-09-10, 21:49   #1392
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Can you give an example?
CRGreathouse is offline   Reply With Quote
Old 2010-09-10, 22:07   #1393
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

for example for a vector v you can use:

Code:
v=vector(100,n,n);v=vector(#v-1,n,v[n+1])
to shift it by one.

is there an equivalent to this for Vec ?
science_man_88 is offline   Reply With Quote
Old 2010-09-10, 23:50   #1394
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
for example for a vector v you can use:

Code:
v=vector(100,n,n);v=vector(#v-1,n,v[n+1])
to shift it by one.

is there an equivalent to this for Vec ?
??

It would be exactly the same.
CRGreathouse is offline   Reply With Quote
Old 2010-09-10, 23:56   #1395
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
??

It would be exactly the same.
how'd you set up that Vec of Vec again ? I swear i saw you do it but I don't get it to work when i try it lol.
science_man_88 is offline   Reply With Quote
Old 2010-09-11, 04:39   #1396
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Example 1:
[[1,2,3,4,5],[2,3,5,7,11]]

Example 2:
vector(5,n,vector(10,m,m^n))
CRGreathouse is offline   Reply With Quote
Old 2010-09-11, 12:46   #1397
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

how will this help with Vec ?
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:12.


Fri Aug 6 23:12:26 UTC 2021 up 14 days, 17:41, 1 user, load averages: 4.32, 4.22, 4.05

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.