<commit_before>include("bounding_box.jl")

function test_bounding_box()
	
	X::Float64 = randn()
	Y::Float64 = randn()
	Z::Float64 = randn()
	THETA1::Float64 = randn()
	THETA2::Float64 = randn()
	THETA3::Float64 = randn()
	R1::Array{Float64,1} = 1.0
	R2::Array{Float64,1} = 2.0
	
	(	lbx::Float64, 
		ubx::Float64, 
		lby::Float64, 
		uby::Float64, 
		lbz::Float64, 
		ubz::Float64) = bounding_box(	X,
									Y,
									Z,
									THETA1,
									THETA2,
									THETA3,
									R1, 
									R2)
	
	t::Array{Float64, 1} = linspace(0, 2*pi, 100000)
	x = xc + r1*cos(t)*cos(theta2)*cos(theta3) - r2*cos(theta2)*sin(t)*sin(theta3);
y = yc + r1*cos(t)*(cos(theta1)*sin(theta3) + cos(theta3)*sin(theta1)*sin(theta2)) + r2*sin(t)*(cos(theta1)*cos(theta3) - sin(theta1)*sin(theta2)*sin(theta3));
z = zc + r1*cos(t)*(sin(theta1)*sin(theta3) - cos(theta1)*cos(theta3)*sin(theta2)) + r2*sin(t)*(cos(theta3)*sin(theta1) + cos(theta1)*sin(theta2)*sin(theta3));


	nothing
end

test_create_cell_lists()<commit_msg>Test function for bounding box<commit_after>include("bounding_box.jl")

function test_bounding_box()
	
	X::Float64 = randn()
	Y::Float64 = randn()
	Z::Float64 = randn()
	THETA1::Float64 = randn()
	THETA2::Float64 = randn()
	THETA3::Float64 = randn()
	R1::Array{Float64,1} = 1.0
	R2::Array{Float64,1} = 2.0
	
	(	lbx::Float64, 
		ubx::Float64, 
		lby::Float64, 
		uby::Float64, 
		lbz::Float64, 
		ubz::Float64) = bounding_box(	X,
									Y,
									Z,
									THETA1,
									THETA2,
									THETA3,
									R1, 
									R2)
	
	t::Array{Float64, 1} = linspace(0, 2*pi, 100000)
	
	x::Array{Float64, 1} = X + R1*cos(t)*cos(THETA2)*cos(THETA3) - R2*cos(THETA2)*sin(t)*sin(THETA3)
	y::Array{Float64, 1} = Y + R1*cos(t)*(cos(THETA1)*sin(THETA3) + cos(THETA3)*sin(THETA1)*sin(THETA2)) + R2*sin(t)*(cos(THETA1)*cos(THETA3) - sin(THETA1)*sin(THETA2)*sin(THETA3))
	z::Array{Float64, 1} = Z + R1*cos(t)*(sin(THETA1)*sin(THETA3) - cos(THETA1)*cos(THETA3)*sin(THETA2)) + R2*sin(t)*(cos(THETA3)*sin(THETA1) + cos(THETA1)*sin(THETA2)*sin(THETA3))
	
	error::Float64 = norm([minimum(x) - lbx, maximum(x) - ubx, minimum(y) - lby, maximum(y) - uby, minimum(z) - lbz, maximum(z) - ubz])

	println(error)

	nothing
end

test_create_cell_lists()
{'fraction_non_alphanumeric': 0.20384443451050513, 'fraction_numerical': 0.0809119356280733, 'mean_word_length': 4.341288782816229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3092126', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1008, 'n_words': 136}