Cpsc 440 Problem Set 4 Question 3

Cpsc 440 Problem Set 4 Question 3 - hw4p3.h #ifndef HW4P3_H...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
hw4p3.h 5/12/2008 # ifndef HW4P3_H # define HW4P3_H typedef struct HermitePolynomial * HermitePolynomial ; HermitePolynomial newHermitePolynomial ( int degree ) ; void freeHermitePolynomial ( HermitePolynomial h ) ; void printHermitePolynomial ( HermitePolynomial h , FILE * output_stream ) ; double evaluateHermitePolynomial ( HermitePolynomial h , double x ) ; double evaluateHPDerivative ( HermitePolynomial h , double x ) ; double newtonsMethodHP ( HermitePolynomial h , double x0 ) ; double * getHermiteCoefficients ( int degree ) ; double * getHigherOrderHermiteCoefficients ( int degree , double * Hkm1 , double * Hkm2 ) ; void printZeros ( double * zeros , int degree , FILE * output_stream ) ; # endif 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
hw4p3.c 5/12/2008 # include < math . h > # include < stdio . h > # include < stdlib . h > # include "hw4p3.h" # define SOLUTION_CONVERGENCE_CRITERION 1e-15 # define SEARCH_BOUND 8 # define SEARCH_INCREMENT 0.01 struct HermitePolynomial { int degree ; double * coefficients ; } ; HermitePolynomial newHermitePolynomial ( int degree ) { HermitePolynomial h = malloc ( sizeof ( struct HermitePolynomial )) ; h - > degree = degree ; h - > coefficients = getHermiteCoefficients ( h - > degree ) ; return ( h ) ; } void freeHermitePolynomial ( HermitePolynomial h ) { free ( h - > coefficients ) ; free ( h ) ; } void printHermitePolynomial ( HermitePolynomial
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/19/2008 for the course CPSC 440 taught by Professor Vladimirrokhlin during the Spring '08 term at Yale.

Page1 / 7

Cpsc 440 Problem Set 4 Question 3 - hw4p3.h #ifndef HW4P3_H...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online