add conv for hw2 and complement main.c
This commit is contained in:
16
hws/hw2/convergence.h
Normal file
16
hws/hw2/convergence.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "nr.h"
|
||||
#include "nrutil.h"
|
||||
|
||||
typedef struct ConvergenceData {
|
||||
int size;
|
||||
float data[200];
|
||||
} ConvergenceData;
|
||||
|
||||
ConvergenceData rtbis_with_conv(float (*func)(float), float x1, float x2, float xacc);
|
||||
ConvergenceData rtflsp_with_conv(float (*func)(float), float x1, float x2, float xacc);
|
||||
ConvergenceData rtsec_with_conv(float (*func)(float), float x1, float x2, float xacc);
|
||||
ConvergenceData rtnewt_with_conv(void (*funcd)(float, float *, float *), float x1, float x2, float xacc);
|
||||
ConvergenceData rtsafe_with_conv(void (*funcd)(float, float *, float *), float x1, float x2, float xacc);
|
||||
ConvergenceData rtmuller_with_conv(float (*func)(float), float x1, float x2, float xacc);
|
||||
Reference in New Issue
Block a user