def function(vec1, vec2)
		case @func
		when :linear
			return normalized_radius(vec1, vec2)
		when :cubic_alt
			return normalized_radius(vec1, vec2)**(1.5)
		when :thin_plate_splines
			return 0.0 if radius(vec1, vec2) == 0.0
			return normalized_radius(vec1, vec2)**2.0 * Math.log(normalized_radius(vec1, vec2))
		when :thin_plate_splines_alt
			rnorm = ((@r0.prod.abs)**(2.0/@r0.size)*(((vec1-vec2).square / @r0.square).sum + 1.0))
			return rnorm * Math.log(rnorm)
		when :multiquadratic
# 			return Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
			(@r0.prod.abs)**(1.0/@r0.size)*Math.sqrt(((vec1-vec2).square / @r0.square).sum + 1.0)
		when :inverse_multiquadratic
			1.0 / ((@r0.prod.abs)**(1.0/@r0.size)*Math.sqrt(((vec1-vec2).square / @r0.square).sum + 1.0))
		when :cubic
			((@r0.prod.abs)**(2.0/@r0.size)*(((vec1-vec2).square / @r0.square).sum + 1.0))**(1.5)
# 			invs = ((vec1-vec2).square + @r0.square).sqrt**(-1)
# 			invs.sum
# 				p @ro
# 			return 1.0 / Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
# 		when :inverse_multiquadratic
# # 				p @ro
# 			return 1.0 / Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
		else
			raise ArgumentError.new("Bad radial basis function: #{@func}")
		end
	end
def function(vec1, vec2)
		case @func
		when :linear
			return normalized_radius(vec1, vec2)
		when :cubic_alt
			return normalized_radius(vec1, vec2)**(1.5)
		when :thin_plate_splines
			return 0.0 if radius(vec1, vec2) == 0.0
			return normalized_radius(vec1, vec2)**2.0 * Math.log(normalized_radius(vec1, vec2))
		when :thin_plate_splines_alt
			rnorm = ((@r0.prod.abs)**(2.0/@r0.size)*(((vec1-vec2).square / @r0.square).sum + 1.0))
			return rnorm * Math.log(rnorm)
		when :multiquadratic
# 			return Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
			(@r0.prod.abs)**(1.0/@r0.size)*Math.sqrt(((vec1-vec2).square / @r0.square).sum + 1.0)
		when :inverse_multiquadratic
			1.0 / ((@r0.prod.abs)**(1.0/@r0.size)*Math.sqrt(((vec1-vec2).square / @r0.square).sum + 1.0))
		when :cubic
			((@r0.prod.abs)**(2.0/@r0.size)*(((vec1-vec2).square / @r0.square).sum + 1.0))**(1.5)
# 			invs = ((vec1-vec2).square + @r0.square).sqrt**(-1)
# 			invs.sum
# 				p @ro
# 			return 1.0 / Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
# 		when :inverse_multiquadratic
# # 				p @ro
# 			return 1.0 / Math.sqrt(radius(vec1, vec2)**2 + Math.sqrt(@r0.square.sum))
		else
			raise ArgumentError.new("Bad radial basis function: #{@func}")
		end
	end
Return the value of the interpolation kernel for the separation between the two given vectors. If linear was chosen this will just be the normalised distance between the two points.