Check-in [a01c3ec3ed]
Not logged in
Overview
SHA1 Hash:a01c3ec3ed3de120ef723cdc6324cc9a6102f4c7
Date: 2011-10-04 17:30:15
User: kinaba
Comment:520 library update
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified lib/typical/dp.cpp from [81322e1ce041bb24] to [ae16b2462960bb78].

50 : N1(2), N2(N2), N3(N3), data(N1*N2*N3, t) { assert(data.size()* 50 : N1(2), N2(N2), N3(N3), data(N1*N2*N3, t) { assert(data.size()* 51 T& operator()(int i1, int i2, int i3) 51 T& operator()(int i1, int i2, int i3) 52 { i1&=1; return data[ ((i1*N2)+i2)*N3+i3 ]; } 52 { i1&=1; return data[ ((i1*N2)+i2)*N3+i3 ]; } 53 void swap(DP3x& rhs) 53 void swap(DP3x& rhs) 54 { data.swap(rhs.data); } 54 { data.swap(rhs.data); } 55 }; 55 }; 56 56 57 // Not Tested | 57 // Tested: SRM 520 Lv2 58 template<typename T> 58 template<typename T> 59 struct DP4 59 struct DP4 60 { 60 { 61 int N1, N2, N3, N4; 61 int N1, N2, N3, N4; 62 vector<T> data; 62 vector<T> data; 63 DP4(int N1, int N2, int N3, int N4, const T& t = T()) 63 DP4(int N1, int N2, int N3, int N4, const T& t = T()) 64 : N1(N1), N2(N2), N3(N3), N4(N4), data(N1*N2*N3*N4, t) { assert( 64 : N1(N1), N2(N2), N3(N3), N4(N4), data(N1*N2*N3*N4, t) { assert(