text:
5" y2="-5.77071875" width="0.125" layer="2"/>
<wire x1="-5.505790625" y1="-5.77071875" x2="-5.505790625" y2="-0.89571875" width="0.125" layer="2"/>
<wire x1="-5.505790625" y1="-0.89571875" x2="-0.880790625" y2="-0.89571875" width="0.125" layer="2"/>
<wire x1="-0.880790625" y1="-0.89571875" x2="-0.880790625" y2="-5.52071875" width="0.125" layer="2"/>
<wire x1="-0.880790625" y1="-5.52071875" x2="-5.255790625" y2="-5.52071875" width="0.125" layer="2"/>
<wire x1="-5.255790625" y1="-1.14571875" x2="-1.130790625" y2="-1.14571875" width="0.125" layer="2"/>
<wire x1="-1.130790625" y1="-1.14571875" x2="-1.130790625" y2="-5.27071875" width="0.125" layer="2"/>
<wire x1="-1.130790625" y1="-5.27071875" x2="-5.005790625" y2="-5.27071875" width="0.125" layer="2"/>
<wire x1="-5.005790625" y1="-5.27071875" x2="-5.005790625" y2="-1.39571875" width="0.125" layer="2"/>
<wire x1="-5.005790625" y1="-1.39571875" x2="-1.380790625" y2="-1.39571875" width="0.125" layer="2"/>
<wire x1="-1.380790625" y1="-5.02071875" x2="-4.755790625" y2="-5.02071875" width="0.125" layer="2"/>
<wire x1="-4.755790625" y1="-5.02071875" x2="-4.755790625" y2="-1.64571875" width="0.125" layer="2"/>
<wire x1="-4.755790625" y1="-1.64571875" x2="-1.630790625" y2="-1.64571875" width="0.125" layer="2"/>
<wire x1="-1.630790625" y1="-1.64571875" x2="-1.630790625" y2="-4.77071875" width="0.125" layer="2"/>
<wire x1="-1.630790625" y1="-4.77071875" x2="-4.505790625" y2="-4.77071875" width="0.125" layer="2"/>
<wire x1="-4.505790625" y1="-1.89571875" x2="-1.880790625" y2="-1.89571875" width="0.125" layer="2"/>
<wire x1="-1.880790625" y1="-1.89571875" x2="-1.880790625" y2="-4.52071875" width="0.125" layer="2"/>
<wire x1="-1.880790625" y1="-4.52071875" x2="-4.255790625" y2="-4.52071875" width="0.125" layer="2"/>
<wire x1="-4.255790625" y1="-2.14571875" x2="-2.130790625" y2="-2.14571875" width="0.125" layer="2"/>
<wire x1="-2.130790625" y1="-4.27071875" x2="-4.005790625" y2="-4.27071875" width="0.125" layer="2"/>
<wire x1="-4.005790625" y1="-4.27071875" x2="-4.005790625" y2="-2.39571875" width="0.125" layer="2"/>
<wire x1="-4.005790625" y1="-2.39571875" x2="-2.380790625" y2="-2.39571875" width="0.125" layer="2"/>
<wire x1="-2.380790625" y1="-2.39571875" x2="-2.380790625" y2="-4.02071875" width="0.125" layer="2"/>
<wire x1="-2.380790625" y1="-4.02071875" x2="-3.755790625" y2="-4.02071875" width="0.125" layer="2"/>
<wire x1="-3.755790625" y1="-4.02071875" x2="-3.755790625" y2="-2.64571875" width="0.125" layer="2"/>
<wire x1="-6.255790625" y1="-0.14571875" x2="-0.130790625" y2="-0.14571875" width="0.125" layer="2"/>
<wire x1="-6.255790625" y1="-0.14571875" x2="-6.255790625" y2="-4.07521875" width="0.125" layer="2"/>
<wire x1="-0.130790625" y1="-0.14571875" x2="-0.130790625" y2="-6.27071875" width="0.125" layer="2"/>
<wire x1="-6.005790625" y1="-6.27071875" x2="-6.005790625" y2="-0.39571875" width="0.125" layer="2"/>
<wire x1="-0.380790625" y1="-0.39571875" x2="-0.380790625" y2="-6.02071875" width="0.125" layer="2"/>
<wire x1="-5.255790625" y1="-5.52071875" x2="-5.255790625" y2="-1.14571875" width="0.125" layer="2"/>
<wire x1="-1.380790625" y1="-1.39571875" x2="-1.380790625" y2="-5.02071875" width="0.125" layer="2"/>
<wire x1="-4.505790625" y1="-4.77071875" x2="-4.505790625" y2="-1.89571875" width="0.125" layer="2"/>
<wire x1="-4.255790625" y1="-4.52071875" x2="-4.255790625" y2="-2.14571875" width="0.125" layer="2"/>
<wire x1="-2.130790625" y1="-2.14571875" x2="-2.130790625" y2="-4.27071875" width="0.125" layer="2"/>
<wire x1="-2.38646875" y1="-2.39053125" x2="-3.76146875" y2="-2.39053125" width="0.125" layer="15"/>
<wire x1="-2.38646875" y1="-4.01553125" x2="-2.38646875" y2="-2.39053125" width="0.125" layer="15"/>
<wire x1="-4.01146875" y1="-4.01553125" x2="-2.38646875" y2="-4.01553125" width="0.125" layer="15"/>
<wire x1="-4.01146875" y1="-2.14053125" x2="-4.01146875" y2="-4.01553125" width="0.125" layer="15"/>
<wire x1="-2.13646875" y1="-2.14053125" x2="-4.01146875" y2="-2.14053125" width="0.125" layer="15"/>
<wire x1="-4.26146875" y1="-4.26553125" x2="-2.13646875" y2="-4.26553125" width="0.125" layer="15"/>
<wire x1="-1.88646875" y1="-1.89053125" x2="-4.26146875" y2="-1.89053125" width="0.125" layer="15"/>
<wire x1="-1.88646875" y1="-4.51553125" x2="-1.88646875" y2="-1.89053125" width="0.125" layer="15"/>
<wire x1="-4.51146875" y1="-4.51553125" x2="-1.88646875" y2="-4.51553125" width="0.125" layer="15"/>
<wire x1="-1.63646875" y1="-1.64053125" x2="-4.51146875" y2="-1.64053125" width="0.125" layer="15"/>
<wire x1="-1.63646875" y1="-4.76553125" x2="-1.63646875" y2="-1.64053125" width="0.125" layer="15"/>
<wire x1="-4.76146875" y1="-4.76553125" x2="-1.63646875" y2="-4.76553125" width="0.125" layer="15"/>
<wire x1="-4.76146875" y1="-1.39053125" x2="-4.76146875" y2="-4.76553125" width="0.125" layer="15"/>
<wire x1="-1.38646875" y1="-1.39053125" x2="-4.76146875" y2="-1.39053125" width="0.125" layer="15"/>
<wire x1="-5.01146875" y1="-5.01553125" x2="-1.38646875" y2="-5.01553125" width="0.125" layer="15"/>
<wire x1="-5.01146875" y1="-1.14053125" x2="-5.01146875" y2="-5.01553125" width="0.125" layer="15"/>
<wire x1="-1.13646875" y1="-1.14053125" x2="-5.01146875" y2="-1.14053125" width="0.125" layer="15"/>
<wire x1="-1.13646875" y1="-5.26553125" x2="-1.13646875" y2="-1.14053125" width="0.125" layer="15"/>
<wire x1="-5.26146875" y1="-5.26553125" x2="-1.13646875" y2="-5.26553125" width="0.125" layer="15"/>
<wire x1="-0.88646875" y1="-0.89053125" x2="-5.26146875" y2="-0.89053125" width="0.125" layer="15"/>
<wire x1="-0.88646875" y1="-5.51553125" x2="-0.88646875" y2="-0.89053125" width="0.125" layer="15"/>
<wire x1="-5.51146875" y1="-5.51553125" x2="-0.88646875" y2="-5.51553125" width="0.125" layer="15"/>
<wire x1="-5.51146875" y1="-0.64053125" x2="-5.51146875" y2="-5.51553125" width="0.125" layer="15"/>
<wire x1="-0.63646875" y1="-0.64053125" x2="-5.51146875" y2="-0.64053125" width="0.125" layer="15"/>
<wire x1="-0.63646875" y1="-5.76553125" x2="-0.63646875" y2="-0.64053125" width="0.125" layer="15"/>
<wire x1="-5.76146875" y1="-5.76553125" x2="-0.63646875" y2="-5.76553125" width="0.125" layer="15"/>
<wire x1="-5.76146875" y1="-0.39053125" x2="-5.76146875" y2="-5.76553125" width="0.125" layer="15"/>
<wire x1="-0.38646875" y1="-0.39053125" x2="-5.76146875" y2="-0.39053125" width="0.125" layer="15"/>
<wire x1="-6.01146875" y1="-6.01553125" x2="-0.38646875" y2="-6.01553125" width="0.125" layer="15"/>
<wire x1="-0.13646875" y1="-0.14053125" x2="-6.01146875" y2="-0.14053125" width="0.125" layer="15"/>
<wire x1="-0.13646875" y1="-6.26553125" x2="-0.13646875" y2="-0.14053125" width="0.125" layer="15"/>
<wire x1="-6.26146875" y1="-6.26553125" x2="-0.13646875" y2="-6.26553125" width="0.125" layer="15"/>
<wire x1="-2.13646875" y1="-4.26553125" x2="-2.13646875" y2="-2.14053125" width="0.125" layer="15"/>
<wire x1="-4.26146875" y1="-1.89053125" x2="-4.26146875" y2="-4.26553125" width="0.125" layer="15"/>
<wire x1="-4.51146875" y1="-1.64053125" x2="-4.51146875" y2="-4.51553125" width="0.125" layer="15"/>
<wire x1="-1.38646875" y1="-5.01553125" x2="-1.38646875" y2="-1.39053125" width="0.125" layer="15"/>
<wire x1="-5.26146875" y1="-0.89053125" x2="-5.26146875" y2="-5.26553125" width="0.125" layer="15"/>
<wire x1="-0.38646875" y1="-6.01553125" x2="-0.38646875" y2="-0.39053125" width="0.125" layer="15"/>
<wire x1="-6.01146875" y1="-0.14053125" x2="-6.01146875" y2="-6.01553125" width="0.125" layer="15"/>
<wire x1="-6.26146875" y1="-6.26553125" x2="-6.26146875" y2="-3.20303125" width="0.125" layer="15"/>
<pad name="TOP_INT1_COIL1" x="-2.905" y="-3.02" drill="0.2" diameter="0.3" rot="R90"/>
<pad name="INT1_INT2_COIL1" x="-6.726" y="-4.081" drill="0.2" diameter="0.3"/>
<pad name="EXITCOIL1" x="-3.219" y="-3.568" drill="0.2" diameter="0.3"/>
<pad name="INCOIL1" x="-6.76" y="-3.22" drill="0.2" diameter="0.3"/>
<wire x1="0.390790625" y1="5.99071875" x2="5.765790625" y2="5.99071875" width="0.125" layer="1"/>
<wire x1="0.640790625" y1="5.74071875" x2="5.515790625" y2="5.74071875" width="0.125" layer="1"/>
<wire x1="0.140790625" y1="6.24071875" x2="6.015790625" y2="6.24071875" width="0.125" layer="1"/>
<wire x1="6.015790625" y1="0.36571875" x2="0.390790625" y2="0.36571875" width="0.125" layer="1"/>
<wire x1="5.765790625" y1="5.99071875" x2="5.765790625" y2="0.61571875" width="0.125" layer="1"/>
<wire x1="5.765790625" y1="0.61571875" x2="0.640790625" y2="0.61571875" width="0.125" layer="1"/>
<wire x1="0.640790625" y1="0.61571875" x2="0.640790625" y2="5.74071875" width="0.125" layer="1"/>
<wire x1="5.515790625" y1="5.74071875" x2="5.515790625" y2="0.86571875" width="0.125" layer="1"/>
<wire x1="5.515790625" y1="0.86571875" x2="0.890790625" y2="0.86571875" width="0.125" layer="1"/>
<wire x1="0.890790625" y1="0.86571875" x2="0.890790625" y2="5.49071875" width="0.125" layer="1"/>
<wire x1="0.890790625" y1="5.49071875" x2="5.265790625" y2="5.49071875" width="0.125" layer="1"/>
<wire x1="5.265790625" y1="1.11571875" x2="1.140790625" y2="1.11571875" width="0.125" layer="1"/>
<wire x1="1.140790625" y1="1.11571875" x2="1.140790625" y2="5.24071875" width="0.125" layer="1"/>
<wire x1="1.140790625" y1="5.24071875" x2="5.015790625" y2="5.24071875" width="0.125" layer="1"/>
<wire x1="5.015790625" y1="5.24071875" x2="5.015790625" y2="1.36571875" width="0.125" layer="1"/>
<wire x1="5.015790625" y1="1.36571875" x2="1.390790625" y2="1.36571875" width="0.125" layer="1"/>
<wire x1="1.390790625" y1="4.99071875" x2="4.765790625" y2="4.99071875" width="0.125" layer="1"/>
<wire x1="4.765790625" y1="4.99071875" x2="4.765790625" y2="1.61571875" width="0.125" layer="1"/>
<wire x1="4.765790625" y1="1.61571875" x2="1.640790625" y2="1.61571875" width="0.125" layer="1"/>
<wire x1="1.640790625" y1="1.61571875" x2="1.640790625" y2="4.74071875" width="0.125" layer="1"/>
<wire x1="1.640790625" y1="4.74071875" x2="4.515790625" y2="4.74071875" width="0.125" layer="1"/>
<wire x1="4.515790625" y1="1.86571875" x2="1.890790625" y2="1.86571875" width="0.125" layer="1"/>
<wire x1="1.890790625" y1="1.86571875" x2="1.890790625" y2="4.49071875" width="0.125" layer="1"/>
<wire x1="1.890790625" y1="4.49071875" x2="4.265790625" y2="4.49071875" width="0.125" layer="1"/>
<wire x1="4.265790625" y1="2.11571875" x2="2.140790625" y2="2.11571875" width="0.125" layer="1"/>
<wire x1="2.140790625" y1="4.24071875" x2="4.015790625" y2="4.24071875" width="0.125" layer="1"/>
<wire x1="4.015790625" y1="4.24071875" x2="4.015790625" y2="2.36571875" width="0.125" layer="1"/>
<wire x1="4.015790625" y1="2.36571875" x2="2.390790625" y2="2.36571875" width="0.125" layer="1"/>
<wire x1="2.390790625" y1="2.36571875" x2="2.390790625" y2="3.99071875" width="0.125" layer="1"/>
<wire x1="2.390790625" y1="3.99071875" x2="3.765790625" y2="3.99071875" width="0.125" layer="1"/>
<wire x1="3.765790625" y1="3.99071875" x2="3.765790625" y2="2.61571875" width="0.125" layer="1"/>
<wire x1="6.265790625" y1="0.11571875" x2="0.140790625" y2="0.11571875" width="0.125" layer="1"/>
<wire x1="0.140790625" y1="0.11571875" x2="0.140790625" y2="6.24071875" width="0.125" layer="1"/>
<wire x1="6.015790625" y1="6.24071875" x2="6.015790625" y2="0.36571875" width="0.125" layer="1"/>
<wire x1="0.390790625" y1="0.36571875" x2="0.390790625" y2="5.99071875" width="0.125" layer="1"/>
<wire x1="5.265790625" y1="5.49071875" x2="5.265790625" y2="1.11571875" width="0.125" layer="1"/>
<wire x1="1.390790625" y1="1.36571875" x2="1.390790625" y2="4.99071875" width="0.125" layer="1"/>
<wire x1="4.515790625" y1="4.74071875" x2="4.515790625" y2="1.86571875" width="0.125" layer="1"/>
<wire x1="4.265790625" y1="4.49071875" x2="4.265790625" y2="2.11571875" width="0.125" layer="1"/>
<wire x1="2.140790625" y1="2.11571875" x2="2.140790625" y2="4.24071875" width="0.125" layer="1"/>
<wire x1="0.390790625" y1="5.99071875" x2="5.765790625" y2="5.99071875" width="0.125" layer="2"/>
<wire x1="0.640790625" y1="5.74071875" x2="5.515790625" y2="5.74071875" width="0.125" layer="2"/>
<wire x1="0.140790625" y1="6.24071875" x2="6.015790625" y2="6.24071875" width="0.125" layer="2"/>
<wire x1="6.015790625" y1="0.36571875" x2="0.390790625" y2="0.36571875" width="0.125" layer="2"/>
<wire x1="5.765790625" y1="5.99071875" x2="5.765790625" y2="0.61571875" width="0.125" layer="2"/>
<wire x1="5.765790625" y1="0.61571875" x2="0.640790625" y2="0.61571875" width="0.125" layer="2"/>
<wire x1="0.640790625" y1="0.61571875" x2="0.640790625" y2="5.74071875" width="0.125" layer="2"/>
<wire x1="5.515790625" y1="5.74071875" x2="5.515790625" y2="0.86571875" width="0.125" layer="2"/>
<wire x1="5.515790625" y1="0.86571875" x2="0.890790625" y2="0.86571875" width="0.125" layer="2"/>
<wire x1="0.890790625" y1="0.86571875" x2="0.890790625" y2="5.49071875" width="0.125" layer="2"/>
<wire x1="0.890790625" y1="5.49071875" x2="5.265790625" y2="5.49071875" width="0.125" layer="2"/>
<wire x1="5.265790625" y1="1.11571875" x2="1.140790625" y2="1.11571875" width="0.125" layer="2"/>
<wire x1="1.140790625" y1="1.11571875" x2="1.140790625" y2="5.24071875" width="0.125" layer="2"/>
<wire x1="1.140790625" y1="5.24071875" x2="5.015790625" y2="5.24071875" width="0.125" layer="2"/>
<wire x1="5.015790625" y1="5.24071875" x2="5.015790625" y2="1.36571875" width="0.125" layer="2"/>
<wire x1="5.015790625" y1="1.36571875" x2="1.390790625" y2="1.36571875" width="0.125" layer="2"/>
<wire x1="1.390790625" y1="4.99071875" x2="4.765790625" y2="4.99071875" width="0.125" layer="2"/>
<wire x1="4.765790625" y1="4.99071875" x2="4.765790625" y2="1.61571875" width="0.125" layer="2"/>
<wire x1="4.765790625" y1="1.61571875" x2="1.640790625" y2="1.61571875" width="0.125" layer="2"/>
<wire x1="1.640790625" y1="1.61571875" x2="1.640790625" y2="4.74071875" width="0.125" layer="2"/>
<wire x1="1.640790625" y1="4.74071875" x2="4.515790625" y2="4.74071875" width="0.125" layer="2"/>
<wire x1="4.515790625" y1="1.86571875" x2="1.890790625" y2="1.86571875" width="0.125" layer="2"/>
<wire x1="1.890790625" y1="1.86571875" x2="1.890790625" y2="4.49071875" width="0.125" layer="2"/>
<wire x1="1.890790625" y1="4.49071875" x2="4.265790625" y2="4.49071875" width="0.125" layer="2"/>
<wire x1="4.265790625" y1="2.11571875" x2="2.140790625" y2="2.11571875" width="0.125" layer="2"/>
<wire x1="2.140790625" y1="4.24071875" x2="4.015790625" y2="4.24071875" width="0.125" layer="2"/>
<wire x1="4.015790625" y1="4.24071875" x2="4.015790625" y2="2.36571875" width="0.125" layer="2"/>
<wire x1="4.015790625" y1="2.36571875" x2="2.390790625" y2="2.36571875" width="0.125" layer="2"/>
<wire x1="2.390790625" y1="2.36571875" x2="2.390790625" y2="3.99071875" width="0.125" layer="2"/>
<wire x1="2.390790625" y1="3.99071875" x2="3.765790625" y2="3.99071875" width="0.125" layer="2"/>
<wire x1="3.765790625" y1="3.99071875" x2="3.765790625" y2="2.61571875" width="0.125" layer="2"/>
<wire x1="6.265790625" y1="0.11571875" x2="0.140790625" y2="0.11571875" width="0.125" layer="2"/>
<wire x1="6.265790625" y1="0.11571875" x2="6.265790625" y2="4.04521875" width="0.125" layer="2"/>
<wire x1="0.140790625" y1="0.11571875" x2="0.140790625" y2="6.24071875" width="0.125" layer="2"/>
<wire x1="6.015790625" y1="6.24071875" x2="6.015790625" y2="0.36571875" width="0.125" layer="2"/>
<wire x1="0.390790625" y1="0.36571875" x2="0.390790625" y2="5.99071875" width="0.125" layer="2"/>
<wire x1="5.265790625" y1="5.49071875" x2="5.265790625" y2="1.11571875" width="0.125" layer="2"/>
<wire x1="1.390790625" y1="1.36571875" x2="1.390790625" y2="4.99071875" width="0.125" layer="2"/>
<wire x1="4.515790625" y1="4.74071875" x2="4.515790625" y2="1.86571875" width="0.125" layer="2"/>
<wire x1="4.265790625" y1="4.49071875" x2="4.265790625" y2="2.11571875" width="0.125" layer="2"/>
<wire x1="2.140790625" y1="2.11571875" x2="2.140790625" y2="4.24071875" width="0.125" layer="2"/>
<wire x1="2.39646875" y1="2.36053125" x2="3.77146875" y2="2.36053125" width="0.125" layer="15"/>
<wire x1="2.39646875" y1="3.98553125" x2="2.39646875" y2="2.36053125" width="0.125" layer="15"/>
<wire x1="4.02146875" y1="3.98553125" x2="2.39646875" y2="3.98553125" width="0.125" layer="15"/>
<wire x1="4.02146875" y1="2.11053125" x2="4.02146875" y2="3.98553125" width="0.125" layer="15"/>
<wire x1="2.14646875" y1="2.11053125" x2="4.02146875" y2="2.11053125" width="0.125" layer="15"/>
<wire x1="4.27146875" y1="4.23553125" x2="2.14646875" y2="4.23553125" width="0.125" layer="15"/>
<wire x1="1.89646875" y1="1.86053125" x2="4.27146875" y2="1.86053125" width="0.125" layer="15"/>
<wire x1="1.89646875" y1="4.48553125" x2="1.89646875" y2="1.86053125" width="0.125" layer="15"/>
<wire x1="4.52146875" y1="4.48553125" x2="1.89646875" y2="4.48553125" width="0.125" layer="15"/>
<wire x1="1.64646875" y1="1.61053125" x2="4.52146875" y2="1.61053125" width="0.125" layer="15"/>
<wire x1="1.64646875" y1="4.73553125" x2="1.64646875" y2="1.61053125" width="0.125" layer="15"/>
<wire x1="4.77146875" y1="4.73553125" x2="1.64646875" y2="4.73553125" width="0.125" layer="15"/>
<wire x1="4.77146875" y1="1.36053125" x2="4.77146875" y2="4.73553125" width="0.125" layer="15"/>
<wire x1="1.39646875" y1="1.36053125" x2="4.77146875" y2="1.36053125" width="0.125" layer="15"/>
<wire x1="5.02146875" y1="4.98553125" x2="1.39646875" y2="4.98553125" width="0.125" layer="15"/>
<wire x1="5.02146875" y1="1.11053125" x2="5.02146875" y2="4.98553125" width="0.125" layer="15"/>
<wire x1="1.14646875" y1="1.11053125" x2="5.02146875" y2="1.11053125" width="0.125" layer="15"/>
<wire x1="1.14646875" y1="5.23553125" x2="1.14646875" y2="1.11053125" width="0.125" layer="15"/>
<wire x1="5.27146875" y1="5.23553125" x2="1.14646875" y2="5.23553125" width="0.125" layer="15"/>
<wire x1="0.89646875" y1="0.86053125" x2="5.27146875" y2="0.86053125" width="0.125" layer="15"/>
<wire x1="0.89646875" y1="5.48553125" x2="0.89646875" y2="0.86053125" width="0.125" layer="15"/>
<wire x1="5.52146875" y1="5.48553125" x2="0.89646875" y2="5.48553125" width="0.125" layer="15"/>
<wire x1="5.52146875" y1="0.61053125" x2="5.52146875" y2="5.48553125" width="0.125" layer="15"/>
<wire x1="0.64646875" y1="0.61053125" x2="5.52146875" y2="0.61053125" width="0.125" layer="15"/>
<wire x1="0.64646875" y1="5.73553125" x2="0.64646875" y2="0.61053125" width="0.125" layer="15"/>
<wire x1="5.77146875" y1="5.73553125" x2="0.64646875" y2="5.73553125" width="0.125" layer="15"/>
<wire x1="5.77146875" y1="0.36053125" x2="5.77146875" y2="5.73553125" width="0.125" layer="15"/>
<wire x1="0.39646875" y1="0.36053125" x2="5.77146875" y2="0.36053125" width="0.125" layer="15"/>
<wire x1="6.02146875" y1="5.98553125" x2="0.39646875" y2="5.98553125" width="0.125" layer="15"/>
<wire x1="0.14646875" y1="0.11053125" x2="6.02146875" y2="0.11053125" width="0.125" layer="15"/>
<wire x1="0.14646875" y1="6.23553125" x2="0.14646875" y2="0.11053125" width="0.125" layer="15"/>
<wire x1="6.27146875" y1="6.23553125" x2="0.14646875" y2="6.23553125" width="0.125" layer="15"/>
<wire x1="2.14646875" y1="4.23553125" x2="2.14646875" y2="2.11053125" width="0.125" layer="15"/>
<wire x1="4.27146875" y1="1.86053125" x2="4.27146875" y2="4.23553125" width="0.125" layer="15"/>
<wire x1="4.52146875" y1="1.61053125" x2="4.52146875" y2="4.48553125" width="0.125" layer="15"/>
<wire x1="1.39646875" y1="4.98553125" x2="1.39646875" y2="1.36053125" width="0.125" layer="15"/>
<wire x1="5.27146875" y1="0.86053125" x2="5.27146875" y2="5.23553125" width="0.125" layer="15"/>
<wire x1="0.39646875" y1="5.98553125" x2="0.39646875" y2="0.36053125" width="0.125" layer="15"/>
<wire x1="6.02146875" y1="0.11053125" x2="6.02146875" y2="5.98553125" width="0.125" layer="15"/>
<wire x1="6.27146875" y1="6.23553125" x2="6.27146875" y2="3.17303125" width="0.125" layer="15"/>
<pad name="TOP_INT1_COIL2" x="2.915" y="2.99" drill="0.2" diameter="0.3" rot="R270"/>
<pad name="INT1_INT2_COIL2" x="6.716" y="4.041" drill="0.2" diameter="0.3" rot="R180"/>
<pad name="EXITCOIL2" x="3.239" y="3.528" drill="0.2" diameter="0.3" rot="R180"/>
<pad name="INCOIL2" x="6.74" y="3.19" drill="0.2" diameter="0.3" rot="R180"/>
<wire x1="0.380790625" y1="-0.37928125" x2="5.755790625" y2="-0.37928125" width="0.125" layer="1"/>
<wire x1="0.630790625" y1="-0.62928125" x2="5.505790625" y2="-0.62928125" width="0.125" layer="1"/>
<wire x1="0.130790625" y1="-0.12928125" x2="6.005790625" y2="-0.12928125" width="0.125" layer="1"/>
<wire x1="6.005790625" y1="-6.00428125" x2="0.380790625" y2="-6.00428125" width="0.125" layer="1"/>
<wire x1="5.755790625" y1="-0.37928125" x2="5.755790625" y2="-5.75428125" width="0.125" layer="1"/>
<wire x1="5.755790625" y1="-5.75428125" x2="0.630790625" y2="-5.75428125" width="0.125" layer="1"/>
<wire x1="0.630790625" y1="-5.75428125" x2="0.630790625" y2="-0.62928125" width="0.125" layer="1"/>
<wire x1="5.505790625" y1="-0.62928125" x2="5.505790625" y2="-5.50428125" width="0.125" layer="1"/>
<wire x1="5.505790625" y1="-5.50428125" x2="0.880790625" y2="-5.50428125" width="0.125" layer="1"/>
<wire x1="0.880790625" y1="-5.50428125" x2="0.880790625" y2="-0.87928125" width="0.125" layer="1"/>
<wire x1="0.880790625" y1="-0.87928125" x2="5.255790625" y2="-0.87928125" width="0.125" layer="1"/>
<wire x1="5.255790625" y1="-5.25428125" x2="1.130790625" y2="-5.25428125" width="0.125" layer="1"/>
<wire x1="1.130790625" y1="-5.25428125" x2="1.130790625" y2="-1.12928125" width="0.125" layer="1"/>
<wire x1="1.130790625" y1="-1.12928125" x2="5.005790625" y2="-1.12928125" width="0.125" layer="1"/>
<wire x1="5.005790625" y1="-1.12928125" x2="5.005790625" y2="-5.00428125" width="0.125" layer="1"/>
<wire x1="5.005790625" y1="-5.00428125" x2="1.380790625" y2="-5.00428125" width="0.125" layer="1"/>
<wire x1="1.380790625" y1="-1.37928125" x2="4.755790625" y2="-1.37928125" width="0.125" layer="1"/>
<wire x1="4.755790625" y1="-1.37928125" x2="4.755790625" y2="-4.75428125" width="0.125" layer="1"/>
<wire x1="4.755790625" y1="-4.75428125" x2="1.630790625" y2="-4.75428125" width="0.125" layer="1"/>
<wire x1="1.630790625" y1="-4.75428125" x2="1.630790625" y2="-1.62928125" width="0.125" layer="1"/>
<wire x1="1.630790625" y1="-1.62928125" x2="4.505790625" y2="-1.62928125" width="0.125" layer="1"/>
<wire x1="4.505790625" y1="-4.50428125" x2="1.880790625" y2="-4.50428125" width="0.125" layer="1"/>
<wire x1="1.880790625" y1="-4.50428125" x2="1.880790625" y2="-1.87928125" width="0.125" layer="1"/>
<wire x1="1.880790625" y1="-1.87928125" x2="4.255790625" y2="-1.87928125" width="0.125" layer="1"/>
<wire x1="4.255790625" y1="-4.25428125" x2="2.130790625" y2="-4.25428125" width="0.125" layer="1"/>
<wire x1="2.130790625" y1="-2.12928125" x2="4.005790625" y2="-2.12928125" width="0.125" layer="1"/>
<wire x1="4.005790625" y1="-2.12928125" x2="4.005790625" y2="-4.00428125" width="0.125" layer="1"/>
<wire x1="4.005790625" y1="-4.00428125" x2="2.380790625" y2="-4.00428125" width="0.125" layer="1"/>
<wire x1="2.380790625" y1="-4.00428125" x2="2.380790625" y2="-2.37928125" width="0.125" layer="1"/>
<wire x1="2.380790625" y1="-2.37928125" x2="3.755790625" y2="-2.37928125" width="0.125" layer="1"/>
<wire x1="3.755790625" y1="-2.37928125" x2="3.755790625" y2="-3.75428125" width="0.125" layer="1"/>
<wire x1="6.255790625" y1="-6.25428125" x2="0.130790625" y2="-6.25428125" width="0.125" layer="1"/>
<wire x1="6.255790625" y1="-6.25428125" x2="6.255790625" y2="-3.19178125" width="0.125" layer="1"/>
<wire x1="0.130790625" y1="-6.25428125" x2="0.130790625" y2="-0.12928125" width="0.125" layer="1"/>
<wire x1="6.005790625" y1="-0.12928125" x2="6.005790625" y2="-6.00428125" width="0.125" layer="1"/>
<wire x1="0.380790625" y1="-6.00428125" x2="0.380790625" y2="-0.37928125" width="0.125" layer="1"/>
<wire x1="5.255790625" y1="-0.87928125" x2="5.255790625" y2="-5.25428125" width="0.125" layer="1"/>
<wire x1="1.380790625" y1="-5.00428125" x2="1.380790625" y2="-1.37928125" width="0.125" layer="1"/>
<wire x1="4.505790625" y1="-1.62928125" x2="4.505790625" y2="-4.50428125" width="0.125" layer="1"/>
<wire x1="4.255790625" y1="-1.87928125" x2="4.255790625" y2="-4.25428125" width="0.125" layer="1"/>
<wire x1="2.130790625" y1="-4.25428125" x2="2.130790625" y2="-2.12928125" width="0.125" layer="1"/>
<wire x1="0.380790625" y1="-0.37928125" x2="5.755790625" y2="-0.37928125" width="0.125" layer="2"/>
<wire x1="0.630790625" y1="-0.62928125" x2="5.505790625" y2="-0.62928125" width="0.125" layer="2"/>
<wire x1="0.130790625" y1="-0.12928125" x2="6.005790625" y2="-0.12928125" width="0.125" layer="2"/>
<wire x1="6.005790625" y1="-6.00428125" x2="0.380790625" y2="-6.00428125" width="0.125" layer="2"/>
<wire x1="5.755790625" y1="-0.37928125" x2="5.755790625" y2="-5.75428125" width="0.125" layer="2"/>
<wire x1="5.755790625" y1="-5.75428125" x2="0.630790625" y2="-5.75428125" width="0.125" layer="2"/>
<wire x1="0.630790625" y1="-5.75428125" x2="0.630790625" y2="-0.62928125" width="0.125" layer="2"/>
<wire x1="5.505790625" y1="-0.62928125" x2="5.505790625" y2="-5.50428125" width="0.125" layer="2"/>
<wire x1="5.505790625" y1="-5.50428125" x2="0.880790625" y2="-5.50428125" width="0.125" layer="2"/>
<wire x1="0.880790625" y1="-5.50428125" x2="0.880790625" y2="-0.87928125" width="0.125" layer="2"/>
<wire x1="0.880790625" y1="-0.87928125" x2="5.255790625" y2="-0.87928125" width="0.125" layer="2"/>
<wire x1="5.255790625" y1="-5.25428125" x2="1.130790625" y2="-5.25428125" width="0.125" layer="2"/>
<wire x1="1.130790625" y1="-5.25428125" x2="1.130790625" y2="-1.12928125" width="0.125" layer="2"/>
<wire x1="1.130790625" y1="-1.12928125" x2="5.005790625" y2="-1.12928125" width="0.125" layer="2"/>
<wire x1="5.005790625" y1="-1.12928125" x2="5.005790625" y2="-5.00428125" width="0.125" layer="2"/>
<wire x1="5.005790625" y1="-5.00428125" x2="1.380790625" y2="-5.00428125" width="0.125" layer="2"/>
<wire x1="1.380790625" y1="-1.37928125" x2="4.755790625" y2="-1.37928125" width="0.125" layer="2"/>
<wire x1="4.755790625" y1="-1.37928125" x2="4.755790625" y2="-4.75428125" width="0.125" layer="2"/>
<wire x1="4.755790625" y1="-4.75428125" x2="1.630790625" y2="-4.75428125" width="0.125" layer="2"/>
<wire x1="1.630790625" y1="-4.75428125" x2="1.630790625" y2="-1.62928125" width="0.125" layer="2"/>
<wire x1="1.630790625" y1="-1.62928125" x2="4.505790625" y2="-1.62928125" width="0.125" layer="2"/>
<wire x1="4.505790625" y1="-4.50428125" x2="1.880790625" y2="-4.50428125" width="0.125" layer="2"/>
<wire x1="1.880790625" y1="-4.50428125" x2="1.880790625" y2="-1.87928125" width="0.125" layer="2"/>
<wire x1="1.880790625" y1="-1.87928125" x2="4.255790625" y2="-1.87928125" width="0.125" layer="2"/>
<wire x1="4.255790625" y1="-4.25428125" x2="2.130790625" y2="-4.25428125" width="0.125" layer="2"/>
<wire x1="2.130790625" y1="-2.12928125" x2="4.005790625" y2="-2.12928125" width="0.125" layer="2"/>
<wire x1="4.005790625" y1="-2.12928125" x2="4.005790625" y2="-4.00428125" width="0.125" layer="2"/>
<wire x1="4.005790625" y1="-4.00428125" x2="2.380790625" y2="-4.00428125" width="0.125" layer="2"/>
<wire x1="2.380790625" y1="-4.00428125" x2="2.380790625" y2="-2.37928125" width="0.125" layer="2"/>
<wire x1="2.380790625" y1="-2.37928125" x2="3.755790625" y2="-2.37928125" width="0.125" layer="2"/>
<wire x1="3.755790625" y1="-2.37928125" x2="3.755790625" y2="-3.75428125" width="0.125" layer="2"/>
<wire x1="6.255790625" y1="-6.25428125" x2="0.130790625" y2="-6.25428125" width="0.125" layer="2"/>
<wire x1="6.255790625" y1="-6.25428125" x2="6.255790625" y2="-2.32478125" width="0.125" layer="2"/>
<wire x1="0.130790625" y1="-6.25428125" x2="0.130790625" y2="-0.12928125" width="0.125" layer="2"/>
<wire x1="6.005790625" y1="-0.12928125" x2="6.005790625" y2="-6.00428125" width="0.125" layer="2"/>
<wire x1="0.380790625" y1="-6.00428125" x2="0.380790625" y2="-0.37928125" width="0.125" layer="2"/>
<wire x1="5.255790625" y1="-0.87928125" x2="5.255790625" y2="-5.25428125" width="0.125" layer="2"/>
<wire x1="1.380790625" y1="-5.00428125" x2="1.380790625" y2="-1.37928125" width="0.125" layer="2"/>
<wire x1="4.505790625" y1="-1.62928125" x2="4.505790625" y2="-4.50428125" width="0.125" layer="2"/>
<wire x1="4.255790625" y1="-1.87928125" x2="4.255790625" y2="-4.25428125" width="0.125" layer="2"/>
<wire x1="2.130790625" y1="-4.25428125" x2="2.130790625" y2="-2.12928125" width="0.125" layer="2"/>
<wire x1="2.38646875" y1="-4.00946875" x2="3.76146875" y2="-4.00946875" width="0.125" layer="15"/>
<wire x1="2.38646875" y1="-2.38446875" x2="2.38646875" y2="-4.00946875" width="0.125" layer="15"/>
<wire x1="4.01146875" y1="-2.38446875" x2="2.38646875" y2="-2.38446875" width="0.125" layer="15"/>
<wire x1="4.01146875" y1="-4.25946875" x2="4.01146875" y2="-2.38446875" width="0.125" layer="15"/>
<wire x1="2.13646875" y1="-4.25946875" x2="4.01146875" y2="-4.25946875" width="0.125" layer="15"/>
<wire x1="4.26146875" y1="-2.13446875" x2="2.13646875" y2="-2.13446875" width="0.125" layer="15"/>
<wire x1="1.88646875" y1="-4.50946875" x2="4.26146875" y2="-4.50946875" width="0.125" layer="15"/>
<wire x1="1.88646875" y1="-1.88446875" x2="1.88646875" y2="-4.50946875" width="0.125" layer="15"/>
<wire x1="4.51146875" y1="-1.88446875" x2="1.88646875" y2="-1.88446875" width="0.125" layer="15"/>
<wire x1="1.63646875" y1="-4.75946875" x2="4.51146875" y2="-4.75946875" width="0.125" layer="15"/>
<wire x1="1.63646875" y1="-1.63446875" x2="1.63646875" y2="-4.75946875" width="0.125" layer="15"/>
<wire x1="4.76146875" y1="-1.63446875" x2="1.63646875" y2="-1.63446875" width="0.125" layer="15"/>
<wire x1="4.76146875" y1="-5.00946875" x2="4.76146875" y2="-1.63446875" width="0.125" layer="15"/>
<wire x1="1.38646875" y1="-5.00946875" x2="4.76146875" y2="-5.00946875" width="0.125" layer="15"/>
<wire x1="5.01146875" y1="-1.38446875" x2="1.38646875" y2="-1.38446875" width="0.125" layer="15"/>
<wire x1="5.01146875" y1="-5.25946875" x2="5.01146875" y2="-1.38446875" width="0.125" layer="15"/>
<wire x1="1.13646875" y1="-5.25946875" x2="5.01146875" y2="-5.25946875" width="0.125" layer="15"/>
<wire x1="1.13646875" y1="-1.13446875" x2="1.13646875" y2="-5.25946875" width="0.125" layer="15"/>
<wire x1="5.26146875" y1="-1.13446875" x2="1.13646875" y2="-1.13446875" width="0.125" layer="15"/>
<wire x1="0.88646875" y1="-5.50946875" x2="5.26146875" y2="-5.50946875" width="0.125" layer="15"/>
<wire x1="0.88646875" y1="-0.88446875" x2="0.88646875" y2="-5.50946875" width="0.125" layer="15"/>
<wire x1="5.51146875" y1="-0.88446875" x2="0.88646875" y2="-0.88446875" width="0.125" layer="15"/>
<wire x1="5.51146875" y1="-5.75946875" x2="5.51146875" y2="-0.88446875" width="0.125" layer="15"/>
<wire x1="0.63646875" y1="-5.75946875" x2="5.51146875" y2="-5.75946875" width="0.125" layer="15"/>
<wire x1="0.63646875" y1="-0.63446875" x2="0.63646875" y2="-5.75946875" width="0.125" layer="15"/>
<wire x1="5.76146875" y1="-0.63446875" x2="0.63646875" y2="-0.63446875" width="0.125" layer="15"/>
<wire x1="5.76146875" y1="-6.00946875" x2="5.76146875" y2="-0.63446875" width="0.125" layer="15"/>
<wire x1="0.38646875" y1="-6.00946875" x2="5.76146875" y2="-6.00946875" width="0.125" layer="15"/>
<wire x1="6.01146875" y1="-0.38446875" x2="0.38646875" y2="-0.38446875" width="0.125" layer="15"/>
<wire x1="0.13646875" y1="-6.25946875" x2="6.01146875" y2="-6.25946875" width="0.125" layer="15"/>
<wire x1="0.13646875" y1="-0.13446875" x2="0.13646875" y2="-6.25946875" width="0.125" layer="15"/>
<wire x1="6.26146875" y1="-0.13446875" x2="0.13646875" y2="-0.13446875" width="0.125" layer="15"/>
<wire x1="2.13646875" y1="-2.13446875" x2="2.13646875" y2="-4.25946875" width="0.125" layer="15"/>
<wire x1="4.26146875" y1="-4.50946875" x2="4.26146875" y2="-2.13446875" width="0.125" layer="15"/>
<wire x1="4.51146875" y1="-4.75946875" x2="4.51146875" y2="-1.88446875" width="0.125" layer="15"/>
<wire x1="1.38646875" y1="-1.38446875" x2="1.38646875" y2="-5.00946875" width="0.125" layer="15"/>
<wire x1="5.26146875" y1="-5.50946875" x2="5.26146875" y2="-1.13446875" width="0.125" layer="15"/>
<wire x1="0.38646875" y1="-0.38446875" x2="0.38646875" y2="-6.00946875" width="0.125" layer="15"/>
<wire x1="6.01146875" y1="-6.25946875" x2="6.01146875" y2="-0.38446875" width="0.125" layer="15"/>
<wire x1="6.26146875" y1="-0.13446875" x2="6.26146875" y2="-3.19696875" width="0.125" layer="15"/>
<pad name="TOP_INT1_COIL3" x="2.905" y="-3.42" drill="0.2" diameter="0.3" rot="R270"/>
<pad name="INT1_INT2_COIL3" x="6.806" y="-3.729" drill="0.2" diameter="0.3" rot="R180"/>
<pad name="EXITCOIL3" x="3.149" y="-2.832" drill="0.2" diameter="0.3" rot="R180"/>
<pad name="INCOIL3" x="6.79" y="-3.07" drill="0.2" diameter="0.3" rot="R180"/>
<wire x1="-2.89" y1="3.33" x2="-3.29" y2="3.73" width="0.125" layer="1"/>
<wire x1="-3.29" y1="3.73" x2="-3.76" y2="3.73" width="0.125" layer="1"/>
<wire x1="-2.89" y1="3.34" x2="-3.28" y2="3.73" width="0.125" layer="2"/>
<wire x1="-3.28" y1="3.73" x2="-3.76" y2="3.73" width="0.125" layer="2"/>
<wire x1="-3.24" y1="2.82" x2="-3.76" y2="3.34" width="0.125" layer="15"/>
<wire x1="-3.76" y1="3.34" x2="-3.76" y2="3.98" width="0.125" layer="15"/>
<wire x1="2.9" y1="3" x2="3.28" y2="2.62" width="0.125" layer="1"/>
<wire x1="3.28" y1="2.62" x2="3.77" y2="2.62" width="0.125" layer="1"/>
<wire x1="2.91" y1="2.99" x2="3.28" y2="2.62" width="0.125" layer="2"/>
<wire x1="3.28" y1="2.62" x2="3.76" y2="2.62" width="0.125" layer="2"/>
<wire x1="3.24" y1="3.52" x2="3.77" y2="2.99" width="0.125" layer="15"/>
<wire x1="3.77" y1="2.99" x2="3.77" y2="2.37" width="0.125" layer="15"/>
<wire x1="3.14" y1="-2.82" x2="3.76" y2="-3.44" width="0.125" layer="15"/>
<wire x1="3.76" y1="-3.44" x2="3.76" y2="-4.01" width="0.125" layer="15"/>
<wire x1="2.9" y1="-3.43" x2="3.23" y2="-3.76" width="0.125" layer="1"/>
<wire x1="3.23" y1="-3.76" x2="3.76" y2="-3.76" width="0.125" layer="1"/>
<wire x1="2.89" y1="-3.41" x2="3.24" y2="-3.76" width="0.125" layer="2"/>
<wire x1="3.24" y1="-3.76" x2="3.76" y2="-3.76" width="0.125" layer="2"/>
<wire x1="-2.91" y1="-3.01" x2="-3.27" y2="-2.65" width="0.125" layer="2"/>
<wire x1="-3.27" y1="-2.65" x2="-3.76" y2="-2.65" width="0.125" layer="2"/>
<wire x1="-3.76" y1="-2.64" x2="-3.29" y2="-2.64" width="0.125" layer="1"/>
<wire x1="-3.29" y1="-2.64" x2="-2.91" y2="-3.02" width="0.125" layer="1"/>
<wire x1="-3.22" y1="-3.57" x2="-3.76" y2="-3.03" width="0.125" layer="15"/>
<wire x1="-3.77" y1="-2.39" x2="-3.77" y2="-3.03" width="0.125" layer="15"/>
<wire x1="6.26" y1="-3.6" x2="6.26" y2="-3.74" width="0.125" layer="1"/>
<wire x1="-6.26" y1="-4.49" x2="-6.26" y2="-4.58" width="0.125" layer="15"/>
<wire x1="-6.26" y1="-3.66" x2="-6.26" y2="-3.6" width="0.125" layer="2"/>
<wire x1="-6.74" y1="-4.08" x2="-6.26" y2="-3.6" width="0.125" layer="2"/>
<wire x1="-6.26" y1="-3.6" x2="-6.26" y2="-3.44" width="0.125" layer="2"/>
<wire x1="-6.75" y1="-4.09" x2="-6.26" y2="-4.58" width="0.125" layer="15"/>
<wire x1="-6.26" y1="-4.58" x2="-6.26" y2="-4.69" width="0.125" layer="15"/>
<wire x1="-6.72" y1="2.29" x2="-6.26" y2="2.75" width="0.125" layer="2"/>
<wire x1="-6.26" y1="2.75" x2="-6.26" y2="2.96" width="0.125" layer="2"/>
<wire x1="-6.72" y1="2.31" x2="-6.26" y2="1.85" width="0.125" layer="15"/>
<wire x1="-6.26" y1="1.85" x2="-6.26" y2="1.66" width="0.125" layer="15"/>
<wire x1="6.72" y1="4.04" x2="6.27" y2="4.49" width="0.125" layer="15"/>
<wire x1="6.27" y1="4.49" x2="6.27" y2="4.85" width="0.125" layer="15"/>
<wire x1="6.71" y1="4.04" x2="6.27" y2="3.6" width="0.125" layer="2"/>
<wire x1="6.27" y1="3.6" x2="6.27" y2="3.37" width="0.125" layer="2"/>
<wire x1="-6.77" y1="-3.22" x2="-6.25" y2="-2.7" width="0.125" layer="1"/>
<wire x1="-6.25" y1="-2.7" x2="-6.25" y2="-2.34" width="0.125" layer="1"/>
<wire x1="-6.79" y1="3.14" x2="-6.25" y2="3.68" width="0.125" layer="1"/>
<wire x1="-6.25" y1="3.68" x2="-6.25" y2="4.03" width="0.125" layer="1"/>
<wire x1="6.81" y1="-3.74" x2="6.26" y2="-3.19" width="0.125" layer="15"/>
<wire x1="6.8" y1="-3.72" x2="6.26" y2="-4.26" width="0.125" layer="2"/>
<wire x1="6.26" y1="-4.26" x2="6.26" y2="-5.18" width="0.125" layer="2"/>
<wire x1="6.78" y1="-3.07" x2="6.26" y2="-3.59" width="0.125" layer="1"/>
<wire x1="6.26" y1="-3.59" x2="6.26" y2="-3.87" width="0.125" layer="1"/>
<wire x1="6.74" y1="3.2" x2="6.28" y2="2.74" width="0.125" layer="1"/>
<wire x1="6.28" y1="2.74" x2="6.28" y2="0.11" width="0.125" layer="1"/>
</package>
</packages>
</library>
<library name="wirepad" urn="urn:adsk.eagle:library:412">
<description><b>Single Pads</b><p>
<author>Created by librarian@cadsoft.de</author></description>
<packages>
<package name="SMD1,27-2,54" urn="urn:adsk.eagle:footprint:30822/1" library_version="1">
<description><b>SMD PAD</b></description>
<smd name="1" x="0" y="0" dx="1.27" dy="2.54" layer="1"/>
<text x="0" y="0" size="0.0254" layer="27">>VALUE</text>
<text x="-0.8" y="-2.4" size="1.27" layer="25" rot="R90">>NAME</text>
</package>
</packages>
<packages3d>
<package3d name="SMD1,27-2,54" urn="urn:adsk.eagle:package:30839/1" type="box" library_version="1">
<description>SMD PAD</description>
<packageinstances>
<packageinstance name="SMD1,27-2,54"/>
</packageinstances>
</package3d>
</packages3d>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<designrules name="pcbtrain4l_narrowannulus">
<description language="en"><b>PCB TRAIN <i>metric</i> Design Rules</b>
<p>
These strictly adhere to the PCB Train board house specs. The rules are <i>metric</i> so there might be problems with high density chips etc.<p></description>
<param name="layerSetup" value="(1+2*15+16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="0.22mm 0.99mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.22mm"/>
<param name="mdWireWire" value="0.15mm"/>
<param name="mdWirePad" value="0.15mm"/>
<param name="mdWireVia" value="0.15mm"/>
<param name="mdPadPad" value="0.15mm"/>
<param name="mdPadVia" value="0.15mm"/>
<param name="mdViaVia" value="0.15mm"/>
<param name="mdSmdPad" value="0mil"/>
<param name="mdSmdVia" value="0mil"/>
<param name="mdSmdSmd" value="0mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="9mil"/>
<param name="mdDrill" value="0.2mm"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="0.15mm"/>
<param name="msDrill" value="0.2mm"/>
<param name="msMicroVia" value="9.99mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.2"/>
<param name="rvPadInner" value="0.15"/>
<param name="rvPadBottom" value="0.2"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="0.125mm"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="0.125mm"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="0.125mm"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="0.1mm"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="0.05mm"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="0.2"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="0.125mm"/>
<param name="mlMaxStopFrame" value="0.125mm"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="0.6mm"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="6mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkAngle" value="1"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="checkStop" value="0"/>
<param name="checkValues" value="0"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="0.25mm"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="2"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="*"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="*"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="U1" library="LDC1614" package="WQFN-16" value="LDC1614" x="0.01" y="-0.02" smashed="yes" rot="MR45">
<attribute name="NAME" x="1.73624375" y="1.870709375" size="1.27" layer="22" rot="MR45"/>
</element>
<element name="R1" library="resistor" library_urn="urn:adsk.eagle:library:348" package="R0402" package3d_urn="urn:adsk.eagle:package:26058/1" value="10k" x="4.68" y="-2.99" smashed="yes" rot="MR180">
<attribute name="NAME" x="5.855" y="-2.295003125" size="1.27" layer="26" rot="MR0"/>
<attribute name="VALUE" x="3.675003125" y="-2.184996875" size="1.27" layer="28" rot="MR90"/>
</element>
<element name="R2" library="resistor" library_urn="urn:adsk.eagle:library:348" package="R0402" package3d_urn="urn:adsk.eagle:package:26058/1" value="10k" x="4.69" y="-4.09" smashed="yes" rot="MR180">
<attribute name="NAME" x="7.715003125" y="-3.665" size="1.27" layer="26" rot="MR270"/>
<attribute name="VALUE" x="5.355003125" y="-3.785003125" size="1.27" layer="28" rot="MR180"/>
</element>
<element name="C1" library="resistor" library_urn="urn:adsk.eagle:library:348" package="C0402" package3d_urn="urn:adsk.eagle:package:26136/1" value="10uF" x="-2.4" y="-1.9" smashed="yes" rot="MR45">
<attribute name="NAME" x="-4.4511125" y="-2.415028125" size="1.27" layer="26" rot="MR45"/>
<attribute name="VALUE" x="-3.08589375" y="-0.231228125" size="1.27" layer="28" rot="MR45"/>
</element>
<element name="U$2" library="coils" package="FAT_SQUARE" value="FATSQUARE_GROUP" x="0.01" y="-0.02"/>
<element name="PAD2" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="-3.47" y="-6.02" smashed="yes" rot="MR180">
<attribute name="VALUE" x="-3.47" y="-6.02" size="0.0254" layer="28" rot="MR180"/>
</element>
<element name="PAD3" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="-5.99" y="-6.02" smashed="yes" rot="MR180">
<attribute name="VALUE" x="-5.99" y="-6.02" size="0.0254" layer="28" rot="MR180"/>
</element>
<element name="PAD5" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="-0.95" y="-6.02" smashed="yes" rot="MR0">
<attribute name="VALUE" x="-0.95" y="-6.02" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD6" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="1.57" y="-6.02" smashed="yes" rot="MR0">
<attribute name="VALUE" x="1.57" y="-6.02" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD7" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="4.09" y="-6.02" smashed="yes" rot="MR0">
<attribute name="VALUE" x="4.09" y="-6.02" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD1" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="-3.47" y="5.5" smashed="yes" rot="MR0">
<attribute name="VALUE" x="-3.47" y="5.5" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD4" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="-5.99" y="5.5" smashed="yes" rot="MR0">
<attribute name="VALUE" x="-5.99" y="5.5" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD9" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="1.57" y="5.5" smashed="yes" rot="MR0">
<attribute name="VALUE" x="1.57" y="5.5" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="PAD10" library="wirepad" library_urn="urn:adsk.eagle:library:412" package="SMD1,27-2,54" package3d_urn="urn:adsk.eagle:package:30839/1" value="WIREPADSMD1,27-254" x="4.09" y="5.5" smashed="yes" rot="MR0">
<attribute name="VALUE" x="4.09" y="5.5" size="0.0254" layer="28" rot="MR0"/>
</element>
<element name="R3" library="resistor" library_urn="urn:adsk.eagle:library:348" package="R0201" package3d_urn="urn:adsk.eagle:package:26117/1" value="NOFIT" x="0.44" y="-3.59" smashed="yes" rot="MR315">
<attribute name="VALUE" x="2.23605" y="-4.488025" size="1.27" layer="28" rot="MR315"/>
</element>
<element name="R4" library="resistor" library_urn="urn:adsk.eagle:library:348" package="R0201" package3d_urn="urn:adsk.eagle:package:26117/1" value="NOFIT" x="1.17" y="-2.84" smashed="yes" rot="MR315">
<attribute name="VALUE" x="2.96605" y="-3.738025" size="1.27" layer="28" rot="MR315"/>
</element>
</elements>
<signals>
<signal name="ADDR">
<contactref element="R3" pad="1"/>
<contactref element="R4" pad="2"/>
<contactref element="U1" pad="ADDR"/>
<wire x1="0.6203125" y1="-3.4096875" x2="0.989690625" y2="-3.040309375" width="0.125" layer="16"/>
<wire x1="0.989690625" y1="-3.040309375" x2="0.989690625" y2="-3.020309375" width="0.125" layer="16"/>
<wire x1="0.823171875" y1="-2.873790625" x2="0.823171875" y2="-1.89383125" width="0.125" layer="16"/>
<wire x1="0.989690625" y1="-3.040309375" x2="0.823171875" y2="-2.873790625" width="0.125" layer="16"/>
</signal>
<signal name="VDD">
<contactref element="R1" pad="2"/>
<contactref element="R2" pad="2"/>
<contactref element="U1" pad="VDD"/>
<contactref element="C1" pad="1"/>
<contactref element="PAD2" pad="1"/>
<wire x1="-3.47" y1="-6.02" x2="-3.47" y2="-5" width="0.25" layer="16"/>
<wire x1="-3.47" y1="-5" x2="-2.06" y2="-3.59" width="0.25" layer="16"/>
<contactref element="PAD1" pad="1"/>
<wire x1="-3.47" y1="6.4156875" x2="-3.47" y2="5.5" width="0.25" layer="16"/>
<via x="-4.84" y="-7.37" extent="1-16" drill="0.2" diameter="0.3"/>
<wire x1="-2.06" y1="-3.59" x2="-2.06" y2="-2.47924375" width="0.25" layer="16"/>
<wire x1="-2.06" y1="-2.47924375" x2="-1.940378125" y2="-2.359621875" width="0.25" layer="16"/>
<wire x1="-1.940378125" y1="-2.359621875" x2="-1.940378125" y2="-1.616828125" width="0.25" layer="16"/>
<wire x1="-3.47" y1="5.1473125" x2="-3.47" y2="5.5" width="0.25" layer="16"/>
<via x="-5" y="6.65" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="-3.74" y1="5.77" x2="-3.47" y2="5.5" width="0.25" layer="16"/>
<contactref element="R3" pad="2"/>
<via x="0.09" y="-6.6901625" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="6.63" y="-6.97" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="0.259690625" y1="-3.770309375" x2="0.259690625" y2="-6.413009375" width="0.125" layer="16"/>
<wire x1="0.1125" y1="-6.5602" x2="0.259690625" y2="-6.413009375" width="0.125" layer="16"/>
<wire x1="0.09" y1="-6.6901625" x2="0.1125" y2="-6.6676625" width="0.125" layer="16"/>
<wire x1="0.1125" y1="-6.6676625" x2="0.1125" y2="-6.5602" width="0.125" layer="16"/>
<wire x1="0.09" y1="-6.6901625" x2="-1.02" y2="-6.6901625" width="0.125" layer="1"/>
<via x="-2.3975" y="-6.720725" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="-1.02" y1="-6.6901625" x2="-1.29" y2="-6.


text:
6901625" width="0.125" layer="1"/>
<wire x1="-3.47" y1="-6.02" x2="-3.315" y2="-6.175" width="0.125" layer="16"/>
<wire x1="-2.849275" y1="-6.640725" x2="-3.315" y2="-6.175" width="0.125" layer="16"/>
<wire x1="-1.940378125" y1="-1.616828125" x2="-1.510278125" y2="-1.186728125" width="0.25" layer="16"/>
<wire x1="-1.510278125" y1="-1.186728125" x2="-1.510278125" y2="-1.186725" width="0.25" layer="16"/>
<wire x1="-1.94038125" y1="-2.35961875" x2="-1.940378125" y2="-2.359621875" width="0.125" layer="16"/>
<wire x1="-3.6443125" y1="6.59" x2="-3.47" y2="6.4156875" width="0.25" layer="16"/>
<wire x1="-4.07" y1="-7.29" x2="-3.57" y2="-6.79" width="0.25" layer="16"/>
<wire x1="-3.57" y1="-6.79" x2="-3.57" y2="-6.43" width="0.25" layer="16"/>
<wire x1="-3.57" y1="-6.43" x2="-3.315" y2="-6.175" width="0.25" layer="16"/>
<wire x1="-4.84" y1="-7.37" x2="-4.76" y2="-7.29" width="0.25" layer="16"/>
<wire x1="-4.76" y1="-7.29" x2="-4.07" y2="-7.29" width="0.25" layer="16"/>
<wire x1="0.09" y1="-6.6901625" x2="2.0001625" y2="-6.6901625" width="0.125" layer="1"/>
<wire x1="5.17784375" y1="-7.15" x2="5.35784375" y2="-6.97" width="0.125" layer="1"/>
<wire x1="5.35784375" y1="-6.97" x2="6.63" y2="-6.97" width="0.125" layer="1"/>
<wire x1="6.63" y1="-6.97" x2="5.34" y2="-5.68" width="0.125" layer="16"/>
<wire x1="-2.3975" y1="-6.720725" x2="-2.4775" y2="-6.640725" width="0.125" layer="16"/>
<wire x1="-2.4775" y1="-6.640725" x2="-2.849275" y2="-6.640725" width="0.125" layer="16"/>
<wire x1="-2.3975" y1="-6.720725" x2="-1.0505625" y2="-6.720725" width="0.125" layer="1"/>
<wire x1="-1.0505625" y1="-6.720725" x2="-1.02" y2="-6.6901625" width="0.125" layer="1"/>
<wire x1="2.46" y1="-7.15" x2="5.17784375" y2="-7.15" width="0.125" layer="1"/>
<wire x1="-5.06" y1="6.59" x2="-5" y2="6.65" width="0.25" layer="1"/>
<wire x1="-3.47" y1="5.5" x2="-3.85" y2="5.5" width="0.25" layer="16"/>
<wire x1="-3.85" y1="5.5" x2="-5" y2="6.65" width="0.25" layer="16"/>
<wire x1="2.0001625" y1="-6.6901625" x2="2.46" y2="-7.15" width="0.125" layer="1"/>
<wire x1="5.33" y1="-2.99" x2="5.33" y2="-4.08" width="0.125" layer="16"/>
<wire x1="5.33" y1="-4.08" x2="5.34" y2="-4.09" width="0.125" layer="16"/>
<wire x1="5.34" y1="-4.09" x2="5.34" y2="-5.68" width="0.125" layer="16"/>
<wire x1="-5.0982125" y1="6.5517875" x2="-5" y2="6.65" width="0.25" layer="1"/>
<wire x1="-6.3855875" y1="6.5517875" x2="-5.0982125" y2="6.5517875" width="0.25" layer="1"/>
<wire x1="-6.81855625" y1="4.93" x2="-6.81855625" y2="6.11881875" width="0.25" layer="1"/>
<wire x1="-6.81855625" y1="6.11881875" x2="-6.3855875" y2="6.5517875" width="0.25" layer="1"/>
<wire x1="-4.84" y1="-7.37" x2="-5.1925" y2="-7.0175" width="0.25" layer="1"/>
<wire x1="-5.1925" y1="-7.0175" x2="-6.6498" y2="-7.0175" width="0.25" layer="1"/>
<wire x1="-6.6498" y1="-7.0175" x2="-7.395" y2="-6.2723" width="0.25" layer="1"/>
<wire x1="-7.32" y1="4.42855625" x2="-6.81855625" y2="4.93" width="0.25" layer="1"/>
<wire x1="-7.2564" y1="2.260025" x2="-7.32" y2="2.323625" width="0.25" layer="1"/>
<wire x1="-7.32" y1="2.323625" x2="-7.32" y2="4.42855625" width="0.25" layer="1"/>
<wire x1="-7.2564" y1="-5.17464375" x2="-7.2564" y2="2.260025" width="0.25" layer="1"/>
<wire x1="-7.505" y1="-5.81675625" x2="-7.505" y2="-5.42324375" width="0.25" layer="1"/>
<wire x1="-7.505" y1="-5.42324375" x2="-7.2564" y2="-5.17464375" width="0.25" layer="1"/>
<wire x1="-7.395" y1="-6.2723" x2="-7.395" y2="-5.92675625" width="0.25" layer="1"/>
<wire x1="-7.395" y1="-5.92675625" x2="-7.505" y2="-5.81675625" width="0.25" layer="1"/>
</signal>
<signal name="GND">
<contactref element="U1" pad="DAP"/>
<contactref element="U1" pad="GND"/>
<contactref element="U1" pad="CLIKIN"/>
<contactref element="C1" pad="2"/>
<contactref element="PAD3" pad="1"/>
<contactref element="U1" pad="SD"/>
<wire x1="0.01" y1="-0.37355625" x2="0.01" y2="-0.02" width="0.25" layer="16"/>
<wire x1="0.01" y1="-1.610990625" x2="0.01" y2="-0.68" width="0.25" layer="16"/>
<wire x1="0.01" y1="-0.68" x2="0.01" y2="-0.02" width="0.25" layer="16"/>
<wire x1="-1.05065625" y1="-0.02" x2="0.01" y2="-0.02" width="0.25" layer="16"/>
<wire x1="1.176728125" y1="-1.54028125" x2="0.01" y2="-0.373553125" width="0.25" layer="16"/>
<wire x1="0.01" y1="-0.373553125" x2="0.01" y2="-0.02" width="0.25" layer="16"/>
<wire x1="-5.99" y1="-6.02" x2="-5.99" y2="-5.26144375" width="0.25" layer="16"/>
<wire x1="-5.99" y1="-6.02" x2="-5.99" y2="-6.41" width="0.125" layer="16"/>
<contactref element="PAD4" pad="1"/>
<polygon width="0.25" layer="16">
<vertex x="-15.17" y="15.41"/>
<vertex x="15.58" y="15.09"/>
<vertex x="15.3" y="-15.34"/>
<vertex x="-15.51" y="-15.28"/>
</polygon>
<polygon width="0.25" layer="1">
<vertex x="-15.42" y="-15.28"/>
<vertex x="-15.25" y="15.3"/>
<vertex x="15.46" y="15.34"/>
<vertex x="15.31" y="-15.34"/>
</polygon>
<wire x1="-2.24" y1="3.8209875" x2="-2.22" y2="3.8409875" width="0.25" layer="16"/>
<via x="-2.3" y="6.78" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="-4.98" y="7.55" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="-5.99" y1="-6.02" x2="-6" y2="-6.01" width="0.25" layer="16"/>
<via x="-7.38" y="7.34" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="-7.41" y="-7.1" extent="1-16" drill="0.2" diameter="0.1"/>
<contactref element="R4" pad="1"/>
<wire x1="1.3503125" y1="-1.713865625" x2="1.176728125" y2="-1.54028125" width="0.125" layer="16"/>
<wire x1="-5.66" y1="-3.64016875" x2="-3.4602125" y2="-1.44038125" width="0.25" layer="16"/>
<wire x1="-3.4602125" y1="-1.44038125" x2="-2.4710375" y2="-1.44038125" width="0.25" layer="16"/>
<via x="-2.96" y="7.38" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="3.07" y="7.28" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="-1.156725" y1="-1.540278125" x2="-0.296446875" y2="-0.68" width="0.25" layer="16"/>
<wire x1="-0.296446875" y1="-0.68" x2="0.01" y2="-0.68" width="0.25" layer="16"/>
<wire x1="-2.859621875" y1="-1.440378125" x2="-2.4710375" y2="-1.440378125" width="0.25" layer="16"/>
<wire x1="-2.4710375" y1="-1.440378125" x2="-1.86383125" y2="-0.833171875" width="0.25" layer="16"/>
<wire x1="-1.86383125" y1="-0.833171875" x2="-1.863828125" y2="-0.833171875" width="0.25" layer="16"/>
<wire x1="-1.863828125" y1="-0.833171875" x2="-1.05065625" y2="-0.02" width="0.25" layer="16"/>
<wire x1="-5.99" y1="-6.02" x2="-5.66" y2="-5.69" width="0.25" layer="16"/>
<wire x1="-5.66" y1="-5.69" x2="-5.66" y2="-3.64016875" width="0.25" layer="16"/>
<wire x1="-4.53" y1="7.13" x2="-4.57" y2="7.13" width="0.25" layer="1"/>
<via x="-4.57" y="7.13" extent="1-16" drill="0.2"/>
<wire x1="-4.57" y1="7.13" x2="-4.58" y2="7.12" width="0.25" layer="16"/>
<wire x1="-4.57" y1="7.13" x2="-5.62" y2="7.13" width="0.25" layer="16"/>
<wire x1="-5.62" y1="7.13" x2="-5.99" y2="6.76" width="0.25" layer="16"/>
<wire x1="-5.99" y1="6.76" x2="-5.99" y2="5.5" width="0.25" layer="16"/>
<wire x1="-2.24" y1="3.8209875" x2="-2.24" y2="6.72" width="0.25" layer="16"/>
<wire x1="-2.24" y1="6.72" x2="-2.3" y2="6.78" width="0.25" layer="16"/>
<wire x1="-2.3" y1="6.78" x2="-4.18" y2="6.78" width="0.25" layer="1"/>
<wire x1="-4.18" y1="6.78" x2="-4.53" y2="7.13" width="0.25" layer="1"/>
<via x="6.74" y="5.35" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="6.68" y="-4.93" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="-6.7" y="0.6" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="0.01" y1="1.5709875" x2="0.01" y2="-0.02" width="0.25" layer="16"/>
<wire x1="-2.24" y1="3.8209875" x2="-0.835415625" y2="2.416403125" width="0.25" layer="16"/>
<wire x1="-0.835415625" y1="2.416403125" x2="-0.800059375" y2="2.416403125" width="0.25" layer="16"/>
<wire x1="-0.800059375" y1="2.416403125" x2="-0.2406" y2="1.85694375" width="0.25" layer="16"/>
<wire x1="-0.2406" y1="1.85694375" x2="-0.2406" y2="1.8215875" width="0.25" layer="16"/>
<wire x1="-0.2406" y1="1.8215875" x2="0.01" y2="1.5709875" width="0.25" layer="16"/>
<wire x1="1.176725" y1="-1.540278125" x2="1.176728125" y2="-1.54028125" width="0.125" layer="16"/>
<wire x1="1.3503125" y1="-1.713865625" x2="1.3503125" y2="-2.6596875" width="0.125" layer="16"/>
</signal>
<signal name="INTRPT">
<contactref element="U1" pad="INTB"/>
<contactref element="PAD5" pad="1"/>
<wire x1="-1.65" y1="-3.7998375" x2="-1.65" y2="-3.44" width="0.125" layer="16"/>
<wire x1="-0.803171875" y1="-2.593171875" x2="-1.65" y2="-3.44" width="0.125" layer="16"/>
<wire x1="-0.95" y1="-6.02" x2="-0.95" y2="-4.4998375" width="0.125" layer="16"/>
<wire x1="-0.95" y1="-4.4998375" x2="-1.65" y2="-3.7998375" width="0.125" layer="16"/>
<wire x1="-0.803171875" y1="-1.89383125" x2="-0.803171875" y2="-2.593171875" width="0.125" layer="16"/>
</signal>
<signal name="N$7">
<contactref element="U$2" pad="EXITCOIL0"/>
<contactref element="U1" pad="IN1B"/>
<wire x1="-3.229" y1="2.802" x2="-1.751340625" y2="2.802" width="0.125" layer="16"/>
<wire x1="-1.751340625" y1="2.802" x2="-0.803171875" y2="1.85383125" width="0.125" layer="16"/>
</signal>
<signal name="N$8">
<contactref element="U$2" pad="INCOIL1"/>
<contactref element="U1" pad="IN0A"/>
<wire x1="-4.9485" y1="-2.291496875" x2="-1.86383125" y2="0.793171875" width="0.125" layer="16"/>
<wire x1="-6.75" y1="-3.24" x2="-5.801496875" y2="-2.291496875" width="0.125" layer="16"/>
<wire x1="-5.801496875" y1="-2.291496875" x2="-4.9485" y2="-2.291496875" width="0.125" layer="16"/>
</signal>
<signal name="N$9">
<contactref element="U$2" pad="EXITCOIL1"/>
<contactref element="U1" pad="IN0B"/>
<wire x1="-1.510278125" y1="1.146725" x2="-1.97" y2="1.606446875" width="0.125" layer="16"/>
<wire x1="-1.97" y1="1.606446875" x2="-1.97" y2="1.61" width="0.125" layer="16"/>
<via x="-7.03" y="-5.62" extent="1-16" drill="0.2" diameter="0.1"/>
<via x="-4.73" y="-6.71" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="-7.26" y1="-5.39" x2="-7.26" y2="-1.84" width="0.125" layer="16"/>
<wire x1="-3.813553125" y1="1.606446875" x2="-1.97" y2="1.606446875" width="0.125" layer="16"/>
<wire x1="-7.26" y1="-1.84" x2="-3.813553125" y2="1.606446875" width="0.125" layer="16"/>
<wire x1="-3.209" y1="-3.588" x2="-4.1585" y2="-4.5375" width="0.125" layer="16"/>
<wire x1="-4.1585" y1="-4.5375" x2="-4.19301875" y2="-4.5375" width="0.125" layer="16"/>
<wire x1="-4.76" y1="-6.68" x2="-6.51" y2="-6.68" width="0.125" layer="1"/>
<wire x1="-4.76" y1="-6.68" x2="-4.73" y2="-6.71" width="0.125" layer="1"/>
<wire x1="-4.73" y1="-6.71" x2="-4.73" y2="-5.07448125" width="0.125" layer="16"/>
<wire x1="-4.73" y1="-5.07448125" x2="-4.19301875" y2="-4.5375" width="0.125" layer="16"/>
<wire x1="-7.26" y1="-5.39" x2="-7.03" y2="-5.62" width="0.125" layer="16"/>
<wire x1="-7.03" y1="-6.16" x2="-7.03" y2="-5.62" width="0.125" layer="1"/>
<wire x1="-6.51" y1="-6.68" x2="-7.03" y2="-6.16" width="0.125" layer="1"/>
</signal>
<signal name="N$10">
<contactref element="U1" pad="IN2A"/>
<contactref element="U$2" pad="EXITCOIL2"/>
<wire x1="0.823175" y1="1.85383125" x2="0.823171875" y2="1.85383125" width="0.125" layer="16"/>
<wire x1="0.823171875" y1="1.85383125" x2="2.477340625" y2="3.508" width="0.125" layer="16"/>
<wire x1="3.249" y1="3.508" x2="2.477340625" y2="3.508" width="0.125" layer="16"/>
</signal>
<signal name="N$11">
<contactref element="U1" pad="IN2B"/>
<contactref element="U$2" pad="INCOIL2"/>
<wire x1="4.519859375" y1="1.8301375" x2="5.142421875" y2="2.4527" width="0.125" layer="16"/>
<wire x1="5.142421875" y1="2.4527" x2="6.6627" y2="2.4527" width="0.125" layer="16"/>
<wire x1="6.75" y1="3.17" x2="6.6627" y2="3.0827" width="0.125" layer="1"/>
<wire x1="6.6627" y1="2.4527" x2="6.6627" y2="3.0827" width="0.125" layer="16"/>
<wire x1="6.6627" y1="3.0827" x2="6.75" y2="3.17" width="0.125" layer="16"/>
<wire x1="1.176725" y1="1.500278125" x2="1.506584375" y2="1.8301375" width="0.125" layer="16"/>
<wire x1="1.506584375" y1="1.8301375" x2="4.519859375" y2="1.8301375" width="0.125" layer="16"/>
</signal>
<signal name="N$12">
<contactref element="U1" pad="IN3A"/>
<contactref element="U$2" pad="INCOIL3"/>
<via x="6.72346875" y="-1.313803125" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="1.53028125" y1="1.146725" x2="1.81355625" y2="1.43" width="0.125" layer="16"/>
<wire x1="1.53028125" y1="1.146725" x2="1.530278125" y2="1.146725" width="0.125" layer="16"/>
<wire x1="5.117359375" y1="-1.313803125" x2="6.72346875" y2="-1.313803125" width="0.125" layer="16"/>
<wire x1="6.78" y1="-1.370334375" x2="6.72346875" y2="-1.313803125" width="0.125" layer="1"/>
<wire x1="1.81355625" y1="1.43" x2="2.37355625" y2="1.43" width="0.125" layer="16"/>
<wire x1="2.37355625" y1="1.43" x2="5.117359375" y2="-1.313803125" width="0.125" layer="16"/>
<wire x1="6.8" y1="-3.09" x2="6.72346875" y2="-3.01346875" width="0.125" layer="1"/>
<wire x1="6.72346875" y1="-3.01346875" x2="6.72346875" y2="-1.313803125" width="0.125" layer="1"/>
</signal>
<signal name="N$13">
<contactref element="U1" pad="IN3B"/>
<contactref element="U$2" pad="EXITCOIL3"/>
<wire x1="1.88383125" y1="0.793171875" x2="3.159" y2="-0.481996875" width="0.125" layer="16"/>
<wire x1="3.159" y1="-0.481996875" x2="3.159" y2="-2.852" width="0.125" layer="16"/>
</signal>
<signal name="N$6">
<contactref element="U1" pad="IN1A"/>
<contactref element="U$2" pad="INCOIL0"/>
<wire x1="-1.796446875" y1="2.14" x2="-1.156725" y2="1.500278125" width="0.125" layer="16"/>
<wire x1="-1.796446875" y1="2.14" x2="-5.34" y2="2.14" width="0.125" layer="16"/>
<wire x1="-6.78" y1="3.13" x2="-6.33" y2="3.13" width="0.125" layer="16"/>
<wire x1="-6.33" y1="3.13" x2="-5.34" y2="2.14" width="0.125" layer="16"/>
</signal>
<signal name="SCL">
<contactref element="PAD10" pad="1"/>
<contactref element="U1" pad="SCL"/>
<contactref element="R1" pad="1"/>
<contactref element="PAD7" pad="1"/>
<wire x1="1.883834375" y1="-0.833175" x2="1.883834375" y2="-0.913834375" width="0.125" layer="16"/>
<wire x1="4.2" y1="5.5" x2="4.09" y2="5.5" width="0.125" layer="16"/>
<wire x1="1.88383125" y1="-0.833171875" x2="1.88383125" y2="-0.91383125" width="0.125" layer="16"/>
<wire x1="1.88383125" y1="-0.91383125" x2="1.883834375" y2="-0.913834375" width="0.125" layer="16"/>
<wire x1="4.78869375" y1="-2.14130625" x2="4.79" y2="-2.14130625" width="0.125" layer="16"/>
<wire x1="4.79" y1="-2.14130625" x2="5.77869375" y2="-2.14130625" width="0.125" layer="16"/>
<wire x1="6.26869375" y1="-1.65130625" x2="5.77869375" y2="-2.14130625" width="0.125" layer="16"/>
<wire x1="4.6025" y1="-4.62801875" x2="4.6025" y2="-3.55198125" width="0.125" layer="16"/>
<wire x1="4.6025" y1="-3.55198125" x2="4.47801875" y2="-3.4275" width="0.125" layer="16"/>
<wire x1="4.09" y1="-6.02" x2="4.09" y2="-5.14051875" width="0.125" layer="16"/>
<wire x1="4.4675" y1="-3.4275" x2="4.47801875" y2="-3.4275" width="0.125" layer="16"/>
<wire x1="4.09" y1="-5.14051875" x2="4.6025" y2="-4.62801875" width="0.125" layer="16"/>
<wire x1="4.4675" y1="-3.4275" x2="4.03" y2="-2.99" width="0.125" layer="16"/>
<wire x1="4.03" y1="-2.99" x2="4.03" y2="-2.90130625" width="0.125" layer="16"/>
<wire x1="4.03" y1="-2.90130625" x2="4.79" y2="-2.14130625" width="0.125" layer="16"/>
<wire x1="3.1425" y1="-3.8775" x2="2.73378125" y2="-3.8775" width="0.125" layer="16"/>
<wire x1="2.73378125" y1="-3.8775" x2="2.4601" y2="-3.60381875" width="0.125" layer="16"/>
<wire x1="4.03" y1="-2.99" x2="3.1425" y2="-3.8775" width="0.125" layer="16"/>
<wire x1="2.4601" y1="-3.60381875" x2="2.4601" y2="-1.409440625" width="0.125" layer="16"/>
<wire x1="2.4601" y1="-1.409440625" x2="1.883834375" y2="-0.833175" width="0.125" layer="16"/>
<wire x1="7.135975" y1="-1.14293125" x2="7.135975" y2="-1.48466875" width="0.125" layer="16"/>
<wire x1="7.135975" y1="-1.48466875" x2="6.8943375" y2="-1.72630625" width="0.125" layer="16"/>
<wire x1="6.8943375" y1="-1.72630625" x2="6.5526" y2="-1.72630625" width="0.125" layer="16"/>
<wire x1="6.5526" y1="-1.72630625" x2="6.4776" y2="-1.65130625" width="0.125" layer="16"/>
<wire x1="6.4776" y1="-1.65130625" x2="6.26869375" y2="-1.65130625" width="0.125" layer="16"/>
<wire x1="4.09" y1="5.5" x2="5.1215" y2="4.4685" width="0.125" layer="16"/>
<wire x1="6.89721875" y1="4.4685" x2="7.1875" y2="4.17821875" width="0.125" layer="16"/>
<wire x1="5.1215" y1="4.4685" x2="6.89721875" y2="4.4685" width="0.125" layer="16"/>
<wire x1="7.1875" y1="-1.09140625" x2="7.135975" y2="-1.14293125" width="0.125" layer="16"/>
<wire x1="7.1875" y1="4.17821875" x2="7.1875" y2="-1.09140625" width="0.125" layer="16"/>
</signal>
<signal name="SDA">
<contactref element="PAD9" pad="1"/>
<contactref element="U1" pad="SDA"/>
<contactref element="R2" pad="1"/>
<contactref element="PAD6" pad="1"/>
<via x="2.80865" y="-6.70865" extent="1-16" drill="0.2" diameter="0.3"/>
<wire x1="1.57" y1="5.5" x2="2.26" y2="6.19" width="0.125" layer="16"/>
<via x="2.92" y="6.67" extent="1-16" drill="0.2" diameter="0.1"/>
<wire x1="1.88" y1="-1.536446875" x2="1.530278125" y2="-1.186725" width="0.125" layer="16"/>
<wire x1="2.25865" y1="-6.70865" x2="2.80865" y2="-6.70865" width="0.125" layer="16"/>
<wire x1="1.57" y1="5.5" x2="2.68" y2="6.61" width="0.125" layer="16"/>
<wire x1="1.57" y1="-5.15" x2="1.57" y2="-6.02" width="0.125" layer="16"/>
<wire x1="1.57" y1="-6.02" x2="2.25865" y2="-6.70865" width="0.125" layer="16"/>
<wire x1="1.98" y1="-6.02" x2="1.57" y2="-6.02" width="0.125" layer="16"/>
<wire x1="4.0175" y1="-4.1125" x2="4.04" y2="-4.09" width="0.125" layer="16"/>
<wire x1="1.57" y1="-6.02" x2="1.57" y2="-5.16236875" width="0.125" layer="16"/>
<wire x1="4.04" y1="-4.09" x2="3.3189125" y2="-4.09" width="0.125" layer="16"/>
<wire x1="3.3189125" y1="-4.09" x2="3.2564125" y2="-4.1525" width="0.125" layer="16"/>
<wire x1="2.61986875" y1="-4.1525" x2="1.88" y2="-3.41263125" width="0.125" layer="16"/>
<wire x1="1.88" y1="-3.41263125" x2="1.88" y2="-1.536446875" width="0.125" layer="16"/>
<wire x1="1.57" y1="-6.02" x2="1.57" y2="-5.20236875" width="0.125" layer="16"/>
<wire x1="1.57" y1="-5.20236875" x2="2.61986875" y2="-4.1525" width="0.125" layer="16"/>
<wire x1="3.2564125" y1="-4.1525" x2="2.61986875" y2="-4.1525" width="0.125" layer="16"/>
<wire x1="2.68" y1="6.61" x2="2.86" y2="6.61" width="0.125" layer="16"/>
<wire x1="2.86" y1="6.61" x2="2.92" y2="6.67" width="0.125" layer="16"/>
<wire x1="3.0175" y1="6.7675" x2="2.92" y2="6.67" width="0.125" layer="1"/>
<wire x1="3.0175" y1="6.7675" x2="6.4125" y2="6.7675" width="0.125" layer="1"/>
<wire x1="2.80865" y1="-6.70865" x2="5.23028125" y2="-6.70865" width="0.125" layer="1"/>
<wire x1="5.23028125" y1="-6.70865" x2="5.38964375" y2="-6.5492875" width="0.125" layer="1"/>
<wire x1="6.28" y1="-6.5492875" x2="5.38964375" y2="-6.5492875" width="0.125" layer="1"/>
<wire x1="7.094496875" y1="-5.19" x2="7.094496875" y2="-4.089221875" width="0.125" layer="1"/>
<wire x1="7.094496875" y1="-4.089221875" x2="7.2535" y2="-3.93021875" width="0.125" layer="1"/>
<wire x1="7.2535" y1="5.9265" x2="7.2535" y2="-3.93021875" width="0.125" layer="1"/>
<wire x1="6.4125" y1="6.7675" x2="7.2535" y2="5.9265" width="0.125" layer="1"/>
<wire x1="6.28" y1="-6.5492875" x2="6.37970625" y2="-6.5492875" width="0.125" layer="1"/>
<wire x1="6.37970625" y1="-6.5492875" x2="7.094496875" y2="-5.834496875" width="0.125" layer="1"/>
<wire x1="7.094496875" y1="-5.834496875" x2="7.094496875" y2="-5.19" width="0.125" layer="1"/>
</signal>
</signals>
<errors>
<approved hash="19,1,6921d07fcb61a3de"/>
<approved hash="19,1,5d64c99bf4eea26f"/>
<approved hash="19,1,8cd6eae46460c70a"/>
<approved hash="19,1,d1b9873b2a0b78de"/>
<approved hash="19,1,e19918f2cde4e4ec"/>
<approved hash="19,1,e85bc8a0c4fc9025"/>
<approved hash="19,1,f32efb3d90845288"/>
<approved hash="19,1,9b75a5a41bf51ba2"/>
<approved hash="19,1,9895fdc3efce3b9f"/>
<approved hash="19,1,dc1ba9ea9e256475"/>
<approved hash="19,1,675837ec4a5e4883"/>
<approved hash="19,2,6261bcb8adb3253a"/>
<approved hash="19,2,f23bfbcc2c68482e"/>
<approved hash="19,2,cea887dfbe09735e"/>
<approved hash="19,2,559759281f2fec92"/>
<approved hash="19,2,4812ef7ddf65a9ef"/>
<approved hash="19,2,63d978f01c1623d6"/>
<approved hash="19,2,eb60baf706aa2bbd"/>
<approved hash="19,15,920f8038a9f6b28c"/>
<approved hash="19,15,6733e4c527e032b7"/>
<approved hash="19,15,54275e9f8861bdcd"/>
<approved hash="19,15,0ad6ff0532b6ad40"/>
<approved hash="19,15,fb7e007d46f87916"/>
<approved hash="19,15,964f8c89935d7701"/>
<approved hash="19,15,1f736317bfff57a2"/>
<approved hash="19,15,238e88c4fdaa66ae"/>
<approved hash="19,2,9b8afbbe14026dc4"/>
</errors>
</board>
</drawing>
<compatibility>
<note version="8.2" severity="warning">
Since Version 8.2, EAGLE supports online libraries. The ids
of those online libraries will not be understood (or retained)
with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports URNs for individual library
assets (packages, symbols, and devices). The URNs of those assets
will not be understood (or retained) with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports the association of 3D packages
with devices in libraries, schematics, and board files. Those 3D
packages will not be understood (or retained) with this version.
</note>
</compatibility>
</eagle>

license: MIT

repository: surgtechlab/MagSense

license_type: permissive

repo_name: surgtechlab/MagSense

branch_name: refs/heads/master

gha_license_id: MIT

extension: brd


text:
// Imlementation of One_R

package rules

type OneR struct {
	Data       *[][]string
	MinBuckets int
}

type OneResult struct {
	Key        string
	TotalError float32
	Rules      *map[string]map[string]float32
}

func (oner *OneR) getKeyLoc(key string) (int, bool) {
	keys := (*oner.Data)[0]
	for i := 0; i < len(keys); i++ {
		if keys[i] == key {
			return i, true
		}
	}
	return -1, false
}

func (oner *OneR) GetInstance(key string, class string) (results map[string]map[string]int, ok bool) {
	loc, ok := oner.getKeyLoc(key)
	resultloc, ok := oner.getKeyLoc(class)
	// resultloc := len((*oner.Data)[0]) - 1
	if !ok || loc == resultloc {
		ok = false
		return
	}
	results = make(map[string]map[string]int)

	for i := 1; i < len(*oner.Data); i++ {
		if _, ok := results[(*oner.Data)[i][loc]]; !ok {
			results[(*oner.Data)[i][loc]] = map[string]int{
				(*oner.Data)[i][resultloc]: 1}
		} else {
			results[(*oner.Data)[i][loc]][(*oner.Data)[i][resultloc]] += 1
		}

	}
	return
}

func (oner *OneR) GetRules(key string, class string) (*map[string]string, bool) {
	if data, ok := oner.GetInstance(key, class); ok {
		rules := make(map[string]string)
		for a, b := range data {
			rules[a] = ""
			for x, y := range b {
				if _, ok := rules[a]; !ok {
					rules[a] = x
				} else {
					if b[rules[a]] < y {
						rules[a] = x
					}
				}
			}
		}
		// exclude rules where every value of a class is unique
		if len(rules) != len(*oner.Data)-1 {
			ok = true
			return &rules, true
		}
	}
	return new(map[string]string), false
}

func (oner *OneR) GetErrorRate(key string, class string) (*map[string]map[string]float32, bool) {
	if rules, ok := oner.GetRules(key, class); ok {
		output := make(map[string]map[string]float32)
		loc, _ := oner.getKeyLoc(key)
		n := len(*oner.Data)
		resultloc, _ := oner.getKeyLoc(class)
		// resultloc := len((*oner.Data)[0]) - 1
		for a, b := range *rules {
			mistakes := 0
			instances := 0
			for i := 1; i < n; i++ {
				if (*oner.Data)[i][loc] == a {
					instances += 1
					if (*oner.Data)[i][resultloc] != b {
						mistakes += 1
					}
				}
			}
			output[a] = map[string]float32{b: float32(mistakes) / float32(n-1)}
		}
		return &output, true
	}
	return new(map[string]map[string]float32), false
}

func (oner *OneR) GetBestRule(class string) (result *OneResult, ok bool) {
	output := make(map[string]*OneResult)
	for _, key := range (*oner.Data)[0] {
		if rules, ok := oner.GetErrorRate(key, class); ok {
			output[key] = &OneResult{key, float32(0), rules}
			for _, mistake := range *rules {
				for _, z := range mistake {
					output[key].TotalError += z
				}

			}
		}
	}

	for _, b := range output {
		if result == nil {
			result = b
		} else {
			if result.TotalError > b.TotalError {
				result = b
			}
		}
	}

	ok = true
	return

}

repository: kksins/go-datamining

repo_name: kksins/go-datamining

extension: go


text:
using System;
using JetBrains.Annotations;
using Vostok.Clusterclient.Core;
using Vostok.ClusterConfig.Client;
using Vostok.Configuration;
using Vostok.Context;
using Vostok.Datacenters;
using Vostok.Hercules.Client.Abstractions;
using Vostok.Hosting.Abstractions;
using Vostok.Logging.Abstractions;
using Vostok.Metrics;
using Vostok.ServiceDiscovery;
using Vostok.ServiceDiscovery.Telemetry;
using Vostok.Tracing.Abstractions;

namespace Vostok.Hosting.Helpers
{
    /// <summary>
    /// See <see cref="Configure"/>.
    /// </summary>
    [PublicAPI]
    public static class StaticProvidersHelper
    {
        /// <summary>
        /// <para>Configures common static providers with values from given <paramref name="environment"/>.</para>
        /// <para>Following static providers are configured:</para>
        /// <list type="bullet">
        ///     <item><description><see cref="LogProvider"/></description></item>
        ///     <item><description><see cref="TracerProvider"/></description></item>
        ///     <item><description><see cref="HerculesSinkProvider"/></description></item>
        ///     <item><description><see cref="DatacentersProvider"/></description></item>
        ///     <item><description><see cref="MetricContextProvider"/></description></item>
        ///     <item><description><see cref="ServiceDiscoveryEventsContextProvider"/></description></item>
        ///     <item><description>ClusterConfigClient.<see cref="ClusterConfigClient.Default"/> (if not configured earlier)</description></item>
        ///     <item><description>ConfigurationProvider.<see cref="ConfigurationProvider.Default"/> (if not configured earlier)</description></item>
        /// </list>
        /// </summary>
        public static void Configure([NotNull] IVostokHostingEnvironment environment)
        {
            if (environment == null)
                throw new ArgumentNullException(nameof(environment));

            ClusterClientDefaults.ClientApplicationName = environment.ServiceBeacon is ServiceBeacon beacon
                ? beacon.ReplicaInfo.Application
                : environment.ApplicationIdentity.FormatServiceName();

            LogProvider.Configure(environment.Log, true);
            TracerProvider.Configure(environment.Tracer, true);
            HerculesSinkProvider.Configure(environment.HerculesSink, true);
            DatacentersProvider.Configure(environment.Datacenters, true);
            MetricContextProvider.Configure(environment.Metrics.Root, true);

            FlowingContext.Configuration.ErrorCallback = (errorMessage, error) => environment.Log.ForContext(typeof(FlowingContext)).Error(error, errorMessage);

            var log = environment.Log.ForContext(typeof(StaticProvidersHelper));

            if (environment.ClusterConfigClient is ClusterConfigClient clusterConfigClient)
            {
                if (!ClusterConfigClient.TrySetDefaultClient(clusterConfigClient) && !ReferenceEquals(ClusterConfigClient.Default, environment.ClusterConfigClient))
                    log.Warn("ClusterConfigClient.Default has already been configured.");
            }

            if (environment.ConfigurationProvider is ConfigurationProvider configurationProvider && !ReferenceEquals(ConfigurationProvider.Default, environment.ConfigurationProvider))
            {
                if (!ConfigurationProvider.TrySetDefault(configurationProvider))
                    log.Warn("ConfigurationProvider.Default has already been configured.");
            }

            if (environment.HostExtensions.TryGet<IServiceDiscoveryEventsContext>(out var context))
            {
                ServiceDiscoveryEventsContextProvider.Configure(context, true);
            }
        }
    }
}

repository: vostok/hosting

repo_name: vostok/hosting

gha_language: C#

extension: cs


text:
DESCRIPTION = "Initial Bootstrap for AT91 ARM MPU"
SECTION = "bootloaders"
LICENSE = "ATMEL"
LIC_FILES_CHKSUM = "file://main.c;endline=27;md5=42f86d2f6fd17d1221c5c651b487a07f"

COMPATIBLE_MACHINE = '(sama5d3xek|at91sam9x5ek)'

PR = "r2"
SRCREV="v3.5.2"

SRC_URI =  "git://github.com/linux4sam/at91bootstrap.git;protocol=git"
SRC_URI += "file://at91sama5d3xek-add-arch-armv7a-gcc-option.patch;name=armv7a_patch"

SRC_URI[armv7a_patch.md5sum] = "23cc3bc49cbb3f44f6590c1051bd931f"
SRC_URI[armv7a_patch.sha256sum] = "940d46c55e0f972d99fd5958d0b639516523135226ee48f8c4e919ce3876cde6"

S = "${WORKDIR}/git"

PARALLEL_MAKE = ""

AT91BOOTSTRAP_MACHINE ??= "${MACHINE}"

do_configure() {
	unset LDFLAGS
	unset CFLAGS
	unset CPPFLAGS
	unset ASFLAGS
	make CROSS_COMPILE=${TARGET_PREFIX} ${AT91BOOTSTRAP_MACHINE}nf_uboot_defconfig
}

do_configure_sama5d3xek() {
	unset LDFLAGS
	unset CFLAGS
	unset CPPFLAGS
	unset ASFLAGS
	make CROSS_COMPILE=${TARGET_PREFIX} at91sama5d3xeknf_uboot_defconfig
}

do_compile() {
	unset LDFLAGS
	unset CFLAGS
	unset CPPFLAGS
	unset ASFLAGS
	make CROSS_COMPILE=${TARGET_PREFIX}
}

inherit deploy

addtask deploy before do_package after do_install

do_deploy () {
	install -d ${DEPLOY_DIR_IMAGE}
	install ${S}/binaries/${AT91BOOTSTRAP_MACHINE}-nandflashboot-uboot-3.5.2.bin ${DEPLOY_DIR_IMAGE}/
}

# Name of binary doesn't follow ${MACHINE} naming convention for the SAMA5D3 series.  Use
# a separate deploy task
do_deploy_sama5d3xek() {
	install -d ${DEPLOYDIR}
	install ${S}/binaries/at91sama5d3xek-nandflashboot-uboot-3.5.2.bin ${DEPLOYDIR}/
}

PACKAGE_ARCH = "${MACHINE_ARCH}"

extension: bb


text:
// Copyright 2017 Jeff Foley. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package viz

import (
	"bufio"
	"encoding/xml"
	"io"
	"strconv"
	"time"
)

const (
	xmlNS    string = "http://www.gephi.org/gexf"
	xmlNSVIZ string = "http://www.gephi.org/gexf/viz"

	classNode string = "node"
	classEdge string = "edge"

	modeStatic  string = "static"
	modeDynamic string = "dynamic"

	edgeTypeDirected   string = "directed"
	edgeTypeUndirected string = "undirected"
	edgeTypeMutual     string = "mutual"
)

type gexfAttrValue struct {
	For   string `xml:"for,attr"`
	Value string `xml:"value,attr"`
}

type gexfAttribute struct {
	ID      string `xml:"id,attr"`
	Title   string `xml:"title,attr"`
	Type    string `xml:"type,attr"`
	Default string `xml:"default,omitempty"`
}

type gexfAttributes struct {
	Class string          `xml:"class,attr"`
	Attrs []gexfAttribute `xml:"attribute"`
}

type gexfParent struct {
	For string `xml:"for,attr"`
}

type gexfColor struct {
	R uint8 `xml:"r,attr"`
	G uint8 `xml:"g,attr"`
	B uint8 `xml:"b,attr"`
}

type gexfNode struct {
	ID      string          `xml:"id,attr"`
	Label   string          `xml:"label,attr,omitempty"`
	Attrs   []gexfAttrValue `xml:"attvalues>attvalue,omitempty"`
	Parents []gexfParent    `xml:"parents>parent"`
	Color   *gexfColor      `xml:"viz:color,omitempty"`
}

type gexfEdge struct {
	ID     string          `xml:"id,attr"`
	Label  string          `xml:"label,attr,omitempty"`
	Type   string          `xml:"type,attr,omitempty"`
	Source string          `xml:"source,attr"`
	Target string          `xml:"target,attr"`
	Weight float64         `xml:"weight,attr,omitempty"`
	Attrs  []gexfAttrValue `xml:"attvalues>attvalue,omitempty"`
}

type gexfMeta struct {
	LastModified string `xml:"lastmodifieddate,attr"`
	Creator      string `xml:"creator"`
	Keywords     string `xml:"keywords,omitempty"`
	Desc         string `xml:"description"`
}

type gexfGraph struct {
	Mode     string         `xml:"mode,attr,omitempty"`
	EdgeType string         `xml:"defaultedgetype,attr,omitempty"`
	Attrs    gexfAttributes `xml:"attributes,omitempty"`
	Nodes    []gexfNode     `xml:"nodes>node,omitempty"`
	Edges    []gexfEdge     `xml:"edges>edge,omitempty"`
}

type gexf struct {
	XMLName xml.Name
	Version string    `xml:"version,attr"`
	Viz     string    `xml:"xmlns:viz,attr"`
	Meta    gexfMeta  `xml:"meta"`
	Graph   gexfGraph `xml:"graph"`
}

var (
	gexfGreen  = &gexfColor{R: 34, G: 153, B: 84}
	gexfRed    = &gexfColor{R: 242, G: 44, B: 13}
	gexfOrange = &gexfColor{R: 243, G: 156, B: 18}
	gexfYellow = &gexfColor{R: 237, G: 243, B: 26}
	gexfCyan   = &gexfColor{R: 26, G: 243, B: 240}
	gexfPurple = &gexfColor{R: 142, G: 68, B: 173}
	gexfPink   = &gexfColor{R: 243, G: 26, B: 188}
	gexfBlue   = &gexfColor{R: 26, G: 69, B: 243}
)

// WriteGEXFData generates a GEXF file to display the Amass graph using Gephi.
func WriteGEXFData(output io.Writer, nodes []Node, edges []Edge) {
	bufwr := bufio.NewWriter(output)

	bufwr.WriteString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
	bufwr.Flush()

	doc := &gexf{
		XMLName: xml.Name{
			Space: xmlNS,
			Local: "gexf",
		},
		Version: "1.3",
		Viz:     xmlNSVIZ,
		Meta: gexfMeta{
			LastModified: time.Now().UTC().Format("2006-01-02"),
			Creator:      "OWASP Amass - https://github.com/OWASP/Amass",
			Desc:         "OWASP Amass Network Mapping",
		},
		Graph: gexfGraph{
			Mode:     modeStatic,
			EdgeType: edgeTypeDirected,
			Attrs: gexfAttributes{
				Class: classNode,
				Attrs: []gexfAttribute{
					{ID: "0", Title: "Title", Type: "string"},
					{ID: "1", Title: "Source", Type: "string"},
					{ID: "2", Title: "Type", Type: "string"},
				},
			},
		},
	}

	for idx, n := range nodes {
		var color *gexfColor

		switch n.Type {
		case "subdomain":
			color = gexfGreen
		case "domain":
			color = gexfRed
		case "address":
			color = gexfOrange
		case "ptr":
			color = gexfYellow
		case "ns":
			color = gexfCyan
		case "mx":
			color = gexfPurple
		case "netblock":
			color = gexfPink
		case "as":
			color = gexfBlue
		}

		doc.Graph.Nodes = append(doc.Graph.Nodes, gexfNode{
			ID:    strconv.Itoa(idx),
			Label: n.Label,
			Attrs: []gexfAttrValue{
				{For: "0", Value: n.Title},
				{For: "1", Value: n.Source},
				{For: "2", Value: n.Type},
			},
			Color: color,
		})
	}

	for idx, e := range edges {
		doc.Graph.Edges = append(doc.Graph.Edges, gexfEdge{
			ID:     strconv.Itoa(idx),
			Label:  e.Label,
			Source: strconv.Itoa(e.From),
			Target: strconv.Itoa(e.To),
		})
	}

	enc := xml.NewEncoder(bufwr)
	enc.Indent("  ", "    ")
	enc.Encode(doc)
	bufwr.Flush()
}

repository: dr-aryone/Amass

repo_name: dr-aryone/Amass


text:
# Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_C_COMPILER_ID GNU)

# Allow the developer to target a runtime environment other than that of the
# build host.
if (OE_PROGRAM_PATH AND OE_SYSROOT)
  set(CMAKE_PROGRAM_PATH ${OE_PROGRAM_PATH})
  set(CMAKE_SYSROOT ${OE_SYSROOT})
  set(CMAKE_FIND_ROOT_PATH ${OE_SYSROOT})
  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  set(ENV{PKG_CONFIG_SYSROOT_DIR} ${OE_SYSROOT})
endif ()

# When using GCC to compile assembly files.
set(OE_TZ_TA_S_FLAGS -DASM=1 -pipe)

# When using GCC to compile C/CXX files.
set(OE_TZ_TA_C_FLAGS
    -DARM64=1
    -D__LP64__=1
    -mstrict-align
    -nostdinc
    -nostdlib
    -nodefaultlibs
    -nostartfiles
    -fno-builtin-memcpy
    -fno-builtin-memset
    -ffreestanding
    -funwind-tables
    -fpie
    -fPIC
    -gdwarf)

# Path to required bits of the TA Dev Kit.
set(OE_TZ_TA_DEV_KIT_CONF ${OE_TA_DEV_KIT_DIR}/host_include/conf.h)
set(OE_TZ_TA_DEV_KIT_LINKER_SCRIPT_TEMPLATE ${OE_TA_DEV_KIT_DIR}/src/ta.ld.S)
set(OE_TZ_TA_DEV_KIT_HEADER_SOURCE ${OE_TA_DEV_KIT_DIR}/src/user_ta_header.c)
set(OE_TZ_TA_DEV_KIT_DEFAULT_SIGNING_KEY
    ${OE_TA_DEV_KIT_DIR}/keys/default_ta.pem)
set(OE_TZ_TA_DEV_KIT_SIGN_TOOL ${OE_TA_DEV_KIT_DIR}/scripts/sign.py)

# Path to OP-TEE OS.
set(OE_TZ_OPTEE_SRC ${PROJECT_SOURCE_DIR}/3rdparty/optee/optee_os)

# Path to OP-TEE's user-mode library (libutee).
set(OE_TZ_LIBUTEE_SRC ${OE_TZ_OPTEE_SRC}/lib/libutee)
set(OE_TZ_LIBUTEE_INC ${OE_TZ_LIBUTEE_SRC}/include)

# Path to OP-TEE's user-mode utilities (libutils).
set(OE_TZ_LIBUTILS_SRC ${OE_TZ_OPTEE_SRC}/lib/libutils)

# Path to OP-TEE's user-mode C runtime library (part of libutils).
set(OE_TZ_LIBUTILS_ISOC_INC ${OE_TZ_LIBUTILS_SRC}/isoc/include)

# Path to OP-TEE's user-mode C runtime library extenions (part of libutils).
set(OE_TZ_LIBUTILS_EXT_SRC ${OE_TZ_LIBUTILS_SRC}/ext)
set(OE_TZ_LIBUTILS_EXT_INC ${OE_TZ_LIBUTILS_EXT_SRC}/include)

# Path to OP-TEE's user-mode math library (libmpa).
set(OE_TZ_LIBMPA_SRC ${OE_TZ_OPTEE_SRC}/lib/libmpa)
set(OE_TZ_LIBMPA_INC ${OE_TZ_LIBMPA_SRC}/include)

# Path to OP-TEE's non-secure user-mode client.
set(OE_TZ_OPTEE_CLIENT_SRC ${PROJECT_SOURCE_DIR}/3rdparty/optee/optee_client)
set(OE_TZ_OPTEE_CLIENT_INC ${OE_TZ_OPTEE_CLIENT_SRC}/public)

repository: openenclave/openenclave

repo_name: openenclave/openenclave

gha_language: C

extension: cmake


text:
package errcode

var (
	ErrorGetTagListFail = NewError(20010001, "獲取標籤列表失敗")
	ErrorCreateTagFail  = NewError(20010002, "建立標籤失敗")
	ErrorUpdateTagFail  = NewError(20010003, "更新標籤失敗")
	ErrorDeleteTagFail  = NewError(20010004, "刪除標籤失敗")
	ErrorCountTagFail   = NewError(20010005, "統計標籤失敗")

	ErrorGetFishFail    = NewError(20020001, "獲取單個魚隻失敗")
	ErrorGetFishsFail   = NewError(20020002, "獲取多個魚隻失敗")
	ErrorCreateFishFail = NewError(20020003, "建立魚隻失敗")
	ErrorUpdateFishFail = NewError(20020004, "更新魚隻失敗")
	ErrorDeleteFishFail = NewError(20020005, "刪除魚隻失敗")

	ErrorUploadFileFail = NewError(20030001, "上傳檔案失敗")

	ErrorGetFishpowerFail    = NewError(20040001, "獲取單個魚隻活動力失敗")
	ErrorGetFishpowersFail   = NewError(20040002, "獲取多個魚隻活動力失敗")
	ErrorCreateFishpowerFail = NewError(20040003, "建立魚隻活動力失敗")
	ErrorUpdateFishpowerFail = NewError(20040004, "更新魚隻活動力失敗")
	ErrorDeleteFishpowerFail = NewError(20040005, "刪除魚隻活動力失敗")
)

branch_name: refs/heads/main


text:
import httpStatus from 'http-status';
import { Request, Response } from 'express';
import { Parcel } from '../../database/models/Parcel';
import helper from '../../helpers';
import { arrayStatus, Status } from './../../interfaces/models.interface';
import { validationResult } from 'express-validator';

export class Admin {
  /**
   * get All parcels for all users
   * @description requires admin token
   * @param  Request req
   * @param  Response res
   * @return object json
   */
  public async getAllParcels(_req: Request, res: Response) {
    try {
      const data = await Parcel.find();
      return helper.getResponse(res, httpStatus.OK, { data });
    } catch (error) {
      return helper.getServerError(res, error.message);
    }
  }

  /**
   * update the parcel status
   * @description requires admin token
   * @param  Request req
   * @param  Response res
   * @return object json
   */
  public async updateParcelStatus(req: Request, res: Response) {
    const { id } = req.params;
    const { status } = req.body;

    await helper.validateEmpty(req, 'status', 'new status');

    const errors = validationResult(req);
    if (!errors.isEmpty()) return helper.getValidationError(res, errors);

    if (!helper.isValidId(id)) {
      return helper.getResponse(res, httpStatus.BAD_REQUEST, {
        message: 'The query params is invalid',
      });
    }

    if (!arrayStatus.includes(status)) {
      return helper.getResponse(res, httpStatus.BAD_REQUEST, {
        message: 'Invalid value for the status',
      });
    }

    try {
      const parcel = await Parcel.findOne({ status, _id: id });
      if (parcel) {
        return helper.getResponse(res, httpStatus.BAD_REQUEST, {
          message: 'the new status must be different from the old',
        });
      }
      const data = await Parcel.findOneAndUpdate({ _id: id }, { status }, { new: true });
      if (!data) return helper.getServerError(res, 'Failed to update the parcel status');

      return helper.getResponse(res, httpStatus.OK, {
        data,
        message: 'Parcel status successfully updated',
      });
    } catch (error) {
      return helper.getServerError(res, error.message);
    }
  }

  /**
   * update the parcel present location
   * @description requires admin token
   * @param  Request req
   * @param  Response res
   * @return object json
   */
  public async updateParcelLocation(req: Request, res: Response) {
    const { id } = req.params;
    const { presentLocation } = req.body;

    await helper.validateEmpty(req, 'presentLocation', 'new present location');

    const errors = validationResult(req);
    if (!errors.isEmpty()) return helper.getValidationError(res, errors);

    if (!helper.isValidId(id)) {
      return helper.getResponse(res, httpStatus.BAD_REQUEST, {
        message: 'The query params is invalid',
      });
    }

    try {
      const parcel = await Parcel.findOne({ _id: id });

      if (!parcel) {
        return helper.getResponse(res, httpStatus.NOT_FOUND, {
          message: 'No parcel was found',
        });
      }

      if (parcel.presentLocation === presentLocation) {
        return helper.getResponse(res, httpStatus.BAD_REQUEST, {
          message: 'the new present location must be different from the old',
        });
      }

      const { destination } = parcel;

      // if presentLocation is equal to destination then status should be `delivered`
      // else status should be transiting
      const newStatus: string =
        presentLocation === destination ? Status.DELIVERED : Status.TRANSITING;

      const data = await Parcel.findOneAndUpdate(
        { _id: id },
        { presentLocation, status: newStatus },
        { new: true },
      );

      return helper.getResponse(res, httpStatus.OK, {
        data,
        message: 'Parcel present location successfully updated',
      });
    } catch (error) {
      return helper.getServerError(res, error.message);
    }
  }

  /**
   * count the number of parcel per status
   * @description requires admin token
   * @param  Request req
   * @param  Response res
   * @return object json
   */
  public async countParcels(_req: Request, res: Response) {
    try {
      const pending = await Parcel.find({ status: Status.PENDING }).countDocuments();
      const transiting = await Parcel.find({ status: Status.TRANSITING }).countDocuments();
      const delivered = await Parcel.find({ status: Status.DELIVERED }).countDocuments();
      const cancelled = await Parcel.find({ status: Status.CANCELLED }).countDocuments();

      return helper.getResponse(res, httpStatus.OK, {
        data: { pending, transiting, delivered, cancelled },
      });
    } catch (error) {
      return helper.getServerError(res, error.message);
    }
  }
}

const adminCtrl = new Admin();
export default adminCtrl;

branch_name: refs/heads/develop

extension: ts


text:
namespace LegoM.Services.Orders.Models
{
    public class OrderServiceModel
    {
        public int Id { get; set; }

        public string FullName { get; set; }

        public string State { get; set; }

        public string City { get; set; }

        public string OrderedOn { get; set; }

        public string TotalAmount { get; set; }
    }
}


text:
// Copyright 2020 Iván Camilo Sanabria
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//	https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main

import "math"

// gcd calculate the great common divisor of given a,b.
func gcd(a int64, b int64) int64 {

	if b == 0 {
		return a
	} else {
		return gcd(b, a%b)
	}
}

// diffGcd calculate gcd of the absolute difference of 2 elements in position i and i-1.
func diffGcd(a []int64) int64 {
	result := int64(math.Abs(float64(a[1] - a[0])))

	for i := 2; i < len(a); i++ {
		result = gcd(result, int64(math.Abs(float64(a[i]-a[i-1]))))
	}

	return result
}

// normalize finds the common salaries for the given array, taking into account the given queries
// that represents raises for all employees of a before normalization is executed.
func normalize(a []int64, queries []int32) []int64 {

	result := make([]int64, 0)
	diff := diffGcd(a)

	for i := 0; i < len(queries); i++ {
		k := int64(queries[i])
		result = append(result, gcd(diff, a[0]+k))
	}

	return result
}

repository: icsanabriar/hackerrank-golang

repo_name: icsanabriar/hackerrank-golang