Skip to content

Commit ad47e32

Browse files
SUSHMIT ROYSUSHMIT ROY
authored andcommitted
Sr : adding lines
1 parent 8c6e5aa commit ad47e32

40 files changed

+796
-84
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.idea/workspace.xml

Lines changed: 94 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 3,
6+
"metadata": {
7+
"collapsed": false
8+
},
9+
"outputs": [
10+
{
11+
"data": {
12+
"text/plain": [
13+
"[1]"
14+
]
15+
},
16+
"execution_count": 3,
17+
"metadata": {},
18+
"output_type": "execute_result"
19+
}
20+
],
21+
"source": [
22+
"s =[1,3]\n",
23+
"\n",
24+
"[s[i] for i in range(len(s)) if i %2 == 0]\n",
25+
"\n",
26+
"def FFT(w, s):\n",
27+
" n = len(s) \n",
28+
" if n==1: return [s[0]] \n",
29+
" f0 = FFT(w*w, [s[i] for i in range(n) if i % 2 == 0]) \n",
30+
" f1 = FFT(w*w, [s[i] for i in range(n) if i % 2 == 1]) \n",
31+
" return [f0[j]+w**j*f1[j] for j in range(n//2)] + [f0[j]-w**(j+n//2)*f1[j] for j in range(n//2)]\n",
32+
"\n"
33+
]
34+
}
35+
],
36+
"metadata": {
37+
"kernelspec": {
38+
"display_name": "Python 3",
39+
"language": "python",
40+
"name": "python3"
41+
},
42+
"language_info": {
43+
"codemirror_mode": {
44+
"name": "ipython",
45+
"version": 3
46+
},
47+
"file_extension": ".py",
48+
"mimetype": "text/x-python",
49+
"name": "python",
50+
"nbconvert_exporter": "python",
51+
"pygments_lexer": "ipython3",
52+
"version": "3.5.1"
53+
}
54+
},
55+
"nbformat": 4,
56+
"nbformat_minor": 0
57+
}

Chapter11.ipynb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 4,
6+
"metadata": {
7+
"collapsed": false
8+
},
9+
"outputs": [],
10+
"source": [
11+
"s =[1,3]\n",
12+
"\n",
13+
"[s[i] for i in range(len(s)) if i %2 == 0]\n",
14+
"\n",
15+
"def FFT(w, s):\n",
16+
" n = len(s) \n",
17+
" if n==1: return [s[0]] \n",
18+
" f0 = FFT(w*w, [s[i] for i in range(n) if i % 2 == 0]) \n",
19+
" f1 = FFT(w*w, [s[i] for i in range(n) if i % 2 == 1]) \n",
20+
" return [f0[j]+w**j*f1[j] for j in range(n//2)] + [f0[j]-w**(j+n//2)*f1[j] for j in range(n//2)]\n",
21+
"\n"
22+
]
23+
}
24+
],
25+
"metadata": {
26+
"kernelspec": {
27+
"display_name": "Python 3",
28+
"language": "python",
29+
"name": "python3"
30+
},
31+
"language_info": {
32+
"codemirror_mode": {
33+
"name": "ipython",
34+
"version": 3
35+
},
36+
"file_extension": ".py",
37+
"mimetype": "text/x-python",
38+
"name": "python",
39+
"nbconvert_exporter": "python",
40+
"pygments_lexer": "ipython3",
41+
"version": "3.5.1"
42+
}
43+
},
44+
"nbformat": 4,
45+
"nbformat_minor": 0
46+
}

0 commit comments

Comments
 (0)