Example #1
0
	def not_a_knot(self):
		data = spline_coeffs.construct_data(self.function, self.interval, self.h)
		# tuple, first is domain data second is expanded function
		coeff_dict = spline_coeffs.not_a_knot(data[0])
		spline_functions = spline_coeffs.construct_spline(coeff_dict, self.domain)
		self.spline = spline_functions
		self.data = data[0]
		self.function = data[1]
		return spline_functions
Example #2
0
	def not_a_knot_user_data(self,data):
		# tuple, first is domain data second is expanded function

		coeff_dict = spline_coeffs.not_a_knot(data)
		self.domain = [t[0] for t in data]
		spline_functions = spline_coeffs.construct_spline(coeff_dict, self.domain)
		self.spline = spline_functions
		self.data = data
		self.h = [self.domain[idx+1]-self.domain[idx] for idx in range(len(self.domain[:-1]))]
		self.interval = [int(self.domain[0]-1),int(np.ceil(self.domain[-1]+1))]
		return spline_functions