PIVector reshape... not works

This commit is contained in:
Andrey
2022-04-19 16:33:13 +03:00
parent 8c6db321cf
commit d4294e3d95
3 changed files with 66 additions and 46 deletions

View File

@@ -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;
}