Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - deleting an entry from intvec
Author Message
  Post subject:  Re: deleting an entry from intvec  Reply with quote
Assume you want to delete the ith entry from an intvec v of length >=2:
Code:
if(i==1) { v=v[2..size(v)]; }
else
{
  if(i==size(v))
  { v=v[1..i-1]; }
  else
  { v=v[1..i-1],v[i+1..size(v)]; }
}
Post Posted: Mon Dec 14, 2015 11:15 am
  Post subject:  deleting an entry from intvec  Reply with quote
How do I delete an entry from an intvec? Could not find any function that does it.
Post Posted: Sat Dec 12, 2015 1:40 am


It is currently Fri May 13, 2022 10:56 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group