PIVector reshape... not works
This commit is contained in:
31
main.cpp
31
main.cpp
@@ -62,33 +62,8 @@ PICout operator <<(PICout s, const ConstChars & v) {
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
// const char * dd = "12345";
|
||||
// char text[]{ "hello" };
|
||||
// ConstChars s("test");
|
||||
// piCout << s;
|
||||
// ConstChars s2;
|
||||
// piCout << s2;
|
||||
// s2 = s;
|
||||
// piCout << s2;
|
||||
// s2 = text;
|
||||
// s = s2;
|
||||
// piCout << s << s2;
|
||||
//// s2 = s;
|
||||
// text[1] = '0';
|
||||
// piCout << text;
|
||||
// piCout << s << s2 << ConstChars(text, 3);
|
||||
//// piCout << s << s2;
|
||||
//// PIString ss(s.data(), s.length());
|
||||
//// piCout << ss;
|
||||
// PICout(PICoutManipulators::DefaultControls | PICoutManipulators::AddQuotes) << PIString(dd);
|
||||
|
||||
// piCout << PIString::fromUTF8("test");
|
||||
// piCout << PIString::fromUTF8("бюд\n");
|
||||
// piCout.writePIString(PIString::fromUTF8("test\n"));
|
||||
// piCout.writePIString(PIString::fromUTF8("бюд\n"));
|
||||
// piCout << "бюд\n";
|
||||
PIVector<int> v{1, 2, 3, 4, 5};
|
||||
int s = v.reduce<int>([](int e, int acc){return acc + e;});
|
||||
piCout << s; // 15
|
||||
PIVector<int> v{1, 2, 3, 4};
|
||||
PIVector<PIVector<int>> v2 = v.reshape(2,2, ReshapeByRow);
|
||||
piCout << v2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user