1use crate::{types, Value};
12use std::mem::MaybeUninit;
13
14#[doc(alias = "gsl_sf_coupling_3j")]
21pub fn _3j(two_ja: i32, two_jb: i32, two_jc: i32, two_ma: i32, two_mb: i32, two_mc: i32) -> f64 {
22 unsafe { ::sys::gsl_sf_coupling_3j(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc) }
23}
24
25#[doc(alias = "gsl_sf_coupling_3j_e")]
32pub fn _3j_e(
33 two_ja: i32,
34 two_jb: i32,
35 two_jc: i32,
36 two_ma: i32,
37 two_mb: i32,
38 two_mc: i32,
39) -> Result<types::Result, Value> {
40 let mut result = MaybeUninit::<sys::gsl_sf_result>::uninit();
41 let ret = unsafe {
42 ::sys::gsl_sf_coupling_3j_e(
43 two_ja,
44 two_jb,
45 two_jc,
46 two_ma,
47 two_mb,
48 two_mc,
49 result.as_mut_ptr(),
50 )
51 };
52
53 result_handler!(ret, unsafe { result.assume_init() }.into())
54}
55
56#[doc(alias = "gsl_sf_coupling_6j")]
63pub fn _6j(two_ja: i32, two_jb: i32, two_jc: i32, two_jd: i32, two_je: i32, two_jf: i32) -> f64 {
64 unsafe { ::sys::gsl_sf_coupling_6j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf) }
65}
66
67#[doc(alias = "gsl_sf_coupling_6j_e")]
74pub fn _6j_e(
75 two_ja: i32,
76 two_jb: i32,
77 two_jc: i32,
78 two_jd: i32,
79 two_je: i32,
80 two_jf: i32,
81) -> Result<types::Result, Value> {
82 let mut result = MaybeUninit::<sys::gsl_sf_result>::uninit();
83 let ret = unsafe {
84 ::sys::gsl_sf_coupling_6j_e(
85 two_ja,
86 two_jb,
87 two_jc,
88 two_jd,
89 two_je,
90 two_jf,
91 result.as_mut_ptr(),
92 )
93 };
94
95 result_handler!(ret, unsafe { result.assume_init() }.into())
96}
97
98#[doc(alias = "gsl_sf_coupling_9j")]
105pub fn _9j(
106 two_ja: i32,
107 two_jb: i32,
108 two_jc: i32,
109 two_jd: i32,
110 two_je: i32,
111 two_jf: i32,
112 two_jg: i32,
113 two_jh: i32,
114 two_ji: i32,
115) -> f64 {
116 unsafe {
117 ::sys::gsl_sf_coupling_9j(
118 two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji,
119 )
120 }
121}
122
123#[doc(alias = "gsl_sf_coupling_9j_e")]
130pub fn _9j_e(
131 two_ja: i32,
132 two_jb: i32,
133 two_jc: i32,
134 two_jd: i32,
135 two_je: i32,
136 two_jf: i32,
137 two_jg: i32,
138 two_jh: i32,
139 two_ji: i32,
140) -> Result<types::Result, Value> {
141 let mut result = MaybeUninit::<sys::gsl_sf_result>::uninit();
142 let ret = unsafe {
143 ::sys::gsl_sf_coupling_9j_e(
144 two_ja,
145 two_jb,
146 two_jc,
147 two_jd,
148 two_je,
149 two_jf,
150 two_jg,
151 two_jh,
152 two_ji,
153 result.as_mut_ptr(),
154 )
155 };
156
157 result_handler!(ret, unsafe { result.assume_init() }.into())
158}