Click here to Skip to main content
15,890,557 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionNode discovery in a truly decentralized system Pin
stopthespying15-Feb-18 6:40
stopthespying15-Feb-18 6:40 
AnswerRe: Node discovery in a truly decentralized system Pin
Gerry Schmitz16-Feb-18 5:21
mveGerry Schmitz16-Feb-18 5:21 
QuestionFinding strongly connected component in a directed Graph using PHP Pin
Member 136573131-Feb-18 21:22
Member 136573131-Feb-18 21:22 
QuestionA very interesting question for you all Pin
Member 1364484725-Jan-18 14:28
Member 1364484725-Jan-18 14:28 
AnswerRe: A very interesting question for you all Pin
Richard MacCutchan25-Jan-18 22:26
mveRichard MacCutchan25-Jan-18 22:26 
AnswerRe: A very interesting question for you all Pin
jschell8-Feb-18 13:33
jschell8-Feb-18 13:33 
AnswerRe: A very interesting question for you all Pin
Luc Pattyn8-Feb-18 14:59
sitebuilderLuc Pattyn8-Feb-18 14:59 
Questionpython code on Effect of order of accuracy on the numerical differentiation Pin
Member 1362564316-Jan-18 1:32
Member 1362564316-Jan-18 1:32 
i am not able to figure out why linspace not able to create equal intervals till the value of machine epsilon
here is the code....

from numpy import *
import sys
import numpy as np
x=1
epsilon=sys.float_info.epsilon/2.0
# machine epsilon
h = np.linspace(1,epsilon,1000)
e1= (((sin(x)- sin(x-h))/h-cos(x))/cos(x))                      #realtive error in first order
e2= (((sin(x-2*h)-4*sin(x-h)+3*sin(x))/(2*h)-cos(x))/cos(x))    #realtive error in second order
e3= (((2*sin(x+h)+3*sin(x)-6*sin(x-h)+sin(x-2*h))/(6*h)-cos(x))/cos(x))#realtive error in third order
e4 = (((-sin(x-3*h)+6*sin(x-2*h)-18*sin(x-h)+10*sin(x)+3*sin(x+h))/(12*h)-cos(x))/cos(x))#realtive error in fourth order
print(h)
import matplotlib.pyplot as plt
plt.plot(h,e1,'-b',lw=3)
plt.plot(h,e2,'-g',lw=3)
plt.plot(h,e3,'-m',lw=3)
plt.plot(h,e4,'-r',lw=3)
plt.xscale('log')
plt.yscale('log')
plt.xlabel('h')
plt.ylabel('Relative error')
plt.legend(['first order','second order','third order','fourth order'])
plt.title('Effect of order of accuracy on the numerical differentiation')
plt.show()

GeneralRe: python code on Effect of order of accuracy on the numerical differentiation Pin
harold aptroot17-Jan-18 23:28
harold aptroot17-Jan-18 23:28 
QuestionCompare products in Cart against min/max limitations Pin
Rico6419-Dec-17 7:07
Rico6419-Dec-17 7:07 
AnswerRe: Compare products in Cart against min/max limitations Pin
Gerry Schmitz21-Dec-17 11:04
mveGerry Schmitz21-Dec-17 11:04 
GeneralRe: Compare products in Cart against min/max limitations Pin
Rico6422-Dec-17 0:42
Rico6422-Dec-17 0:42 
AnswerRe: Compare products in Cart against min/max limitations Pin
Richard MacCutchan21-Dec-17 21:40
mveRichard MacCutchan21-Dec-17 21:40 
QuestionWriting a Sorting Algorithm -- NEED HELP! Pin
Member 135671429-Dec-17 11:36
Member 135671429-Dec-17 11:36 
AnswerRe: Writing a Sorting Algorithm -- NEED HELP! PinPopular
Gerry Schmitz10-Dec-17 1:09
mveGerry Schmitz10-Dec-17 1:09 
AnswerRe: Writing a Sorting Algorithm -- NEED HELP! Pin
Richard MacCutchan10-Dec-17 1:22
mveRichard MacCutchan10-Dec-17 1:22 
GeneralRe: Writing a Sorting Algorithm -- NEED HELP! Pin
Jc Christ5-Jun-20 1:57
Jc Christ5-Jun-20 1:57 
AnswerRe: Writing a Sorting Algorithm -- NEED HELP! PinPopular
Richard Deeming11-Dec-17 1:58
mveRichard Deeming11-Dec-17 1:58 
AnswerRe: Writing a Sorting Algorithm -- NEED HELP! Pin
Member 1488614010-Jul-20 3:04
Member 1488614010-Jul-20 3:04 
GeneralRe: Writing a Sorting Algorithm -- NEED HELP! Pin
Dave Kreskowiak23-Jul-20 3:39
mveDave Kreskowiak23-Jul-20 3:39 
QuestionA permutation problem Pin
Member 135615816-Dec-17 4:04
Member 135615816-Dec-17 4:04 
AnswerRe: A permutation problem Pin
Richard MacCutchan6-Dec-17 4:09
mveRichard MacCutchan6-Dec-17 4:09 
AnswerRe: A permutation problem Pin
Luc Pattyn20-Dec-17 12:03
sitebuilderLuc Pattyn20-Dec-17 12:03 
QuestionAlgorithm for insert element in compressed sparse row matrix Pin
drudox 16-Nov-17 4:23
drudox 16-Nov-17 4:23 
QuestionNo-intersection edge detection. Pin
primem0ver11-Nov-17 6:19
primem0ver11-Nov-17 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.