The algorith divides rows in to four equal groups. The rows are then used to from a distance graph which is then transformed into a matrix. girth of eight is maintained by avoiding six-cycles in the graph construction
標簽: rows The algorith distance
上傳時間: 2014-01-15
上傳用戶:kelimu
This example sets up the PLL in x10/2 mode, divides SYSCLKOUT by six to reach a 25Mhz HSPCLK (assuming a 30Mhz XCLKIN). The clock divider in the ADC is not used so that the ADC will see the 25Mhz on the HSPCLK. Interrupts are enabled and the EVA is setup to generate a periodic ADC SOC on SEQ1. Two channels are converted, ADCINA3 and ADCINA2.
標簽: SYSCLKOUT example divides HSPCLK
上傳時間: 2014-01-25
上傳用戶:ljt101007
浮點數基本運算 浮點數的基本運算主要有四則運算、符號處理、大小比較,以及浮點數分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數基本運算 浮點數的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數,結果當然也是浮點數了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結果 btil::fn::minus<f1, f2>::value // f1-f2 的結果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結果 btil::fn::divides<f1, f2>::value // f1/f2 的結果 plus<f1, f2>::value::f_val // f1+f2 的結果的值 struct one { static const double f_val = 1.0 } // 兩個浮點數 struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數的負數。
上傳時間: 2014-12-06
上傳用戶:exxxds
自己用C編寫的小游戲,DOS界面哦,可以運行。 浮點數基本運算 浮點數的基本運算主要有四則運算、符號處理、大小比較,以及浮點數分柝等。 包含頭文件 "fn.hpp" #include "fn.hpp" 浮點數基本運算 浮點數的基本運算中有加、減、乘、除、取負、絕對值、相等比較等。 加減乘除 加、減、乘、除四個運算極為相似,都是需要兩個參數,結果當然也是浮點數了。 例子: // 加 減 乘 除 btil::fn::plus<f1, f2>::value // f1+f2 的結果 btil::fn::minus<f1, f2>::value // f1-f2 的結果 btil::fn::multiplies<f1, f2>::value // f1*f2 的結果 btil::fn::divides<f1, f2>::value // f1/f2 的結果 plus<f1, f2>::value::f_val // f1+f2 的結果的值 struct one { static const double f_val = 1.0 } // 兩個浮點數 struct two { static const double f_val = 2.0 } minus<two, plus<divides<one, two>::value, one>::value >::value::f_val == 0.5 取負 取負運算就是取一個浮點數的負數。
上傳時間: 2014-12-06
上傳用戶:jichenxi0730
數字運算,判斷一個數是否接近素數 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上傳時間: 2015-05-21
上傳用戶:daguda
參考網上的提供的代碼,我把uCosII移植到MSP430f149上,分三個任務,分別是485通訊,鍵盤掃描,LED顯示,可供參考!- Refers to code which on-line provides, I transplant uCosII to MSP430f149 on, divides three duties, respectively is 485 communications, scanning, LED demonstrated
標簽: on-line uCosII Refers which
上傳時間: 2013-12-11
上傳用戶:xieguodong1234
Input : A set S of planar points Output : A convex hull for S Step 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return. Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR . Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull(SL) and Hull(SR) respectively. Step 4: Apply the merging procedure to merge Hull(SL) and Hull(SR) together to form a convex hull. Time complexity: T(n) = 2T(n/2) + O(n) = O(n log n)
標簽: contains Output convex planar
上傳時間: 2017-02-19
上傳用戶:wyc199288
cordic methods describe essentially the same algorithm that with suitably chosen inputs can be used to calculate a whole range of scientific functions including sin, cos, tan, arctan, arcsin, arccos, sinh, cosh, tanh, arctanh, log, exp, square root and even multiply and divide. the method dates back to volder [1959], and due to its versatility and compactness, it made possible the microcoding of the hp35 pocket scientific calculator in 1972. here is some code to illustrate the techniques. ive split the methods into three parts linear, circular and hyperbolic. in the hp35 microcode these would be unified into one function (for space reasons). because the linear mode can perform multiply and divide, you only need add/subtract and shift to complete the implementation. you can select in the code whether to do the multiples and divides also by cordic means. other multiplies and divides are all powers of 2 (these dont count). to eliminate these too, would involve ieee hackery.
標簽: essentially algorithm describe suitably
上傳時間: 2017-03-02
上傳用戶:litianchu