From 3138d389e4088201c8579dcb67c1e07310fbbff2 Mon Sep 17 00:00:00 2001 From: Sandipan Mohanty <s.mohanty@fz-juelich.de> Date: Thu, 11 May 2023 09:27:01 +0200 Subject: [PATCH] lambda practice typos fixed --- notebooks/lambda_practice_0.ipynb | 6 +- notebooks/lambda_practice_1.ipynb | 197 +++--------------------------- 2 files changed, 17 insertions(+), 186 deletions(-) diff --git a/notebooks/lambda_practice_0.ipynb b/notebooks/lambda_practice_0.ipynb index 2f2ff1e..6c87c28 100644 --- a/notebooks/lambda_practice_0.ipynb +++ b/notebooks/lambda_practice_0.ipynb @@ -232,9 +232,9 @@ ], "metadata": { "kernelspec": { - "display_name": "C++17", - "language": "C++", - "name": "cling-cpp17" + "display_name": "YourCXX", + "language": "c++", + "name": "yourcxx" }, "language_info": { "codemirror_mode": "c++", diff --git a/notebooks/lambda_practice_1.ipynb b/notebooks/lambda_practice_1.ipynb index 716efb4..520f10c 100644 --- a/notebooks/lambda_practice_1.ipynb +++ b/notebooks/lambda_practice_1.ipynb @@ -2,21 +2,12 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "e7b04ecc", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "#pragma cling add_include_path(\"/p/project/training2213/local/include\")\n", + "#pragma cling add_include_path(\"/p/project/training2312/local/include\")\n", "#include <iostream>\n", "#include <vector>\n", "#include <algorithm>\n", @@ -42,59 +33,10 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "1e7328f5", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Constructor of object at 140514652397128, using string \"dinosaur\"\n", - "Constructor of object at 140514652397040, using string \"fish\"\n", - "Declaring lambda function {\n", - "Copy constructor of object at 140514652396968. Source for copy is at 140514652397128\n", - "Declaring lambda function }\n", - "Changing internal value of object at 140514652397128 from dinosaur to bird\n", - "Calling lambda function {\n", - "5 -> \n", - "In lambda function, captured value of locvar is : dinosaur\n", - "125\n", - "Calling lambda function }\n", - "Calling lambda function {\n", - "5 -> \n", - "In lambda function, captured value of locvar is : dinosaur\n", - "125\n", - "Calling lambda function }\n", - "Calling lambda function {\n", - "5 -> \n", - "In lambda function, captured value of locvar is : dinosaur\n", - "125\n", - "Calling lambda function }\n", - "Calling lambda function {\n", - "5 -> \n", - "In lambda function, captured value of locvar is : dinosaur\n", - "125\n", - "Calling lambda function }\n", - "Calling lambda function {\n", - "5 -> \n", - "In lambda function, captured value of locvar is : dinosaur\n", - "125\n", - "Calling lambda function }\n", - "Destructor of object at 140514652396968 with data \"dinosaur\"\n", - "Destructor of object at 140514652397040 with data \"fish\"\n", - "Destructor of object at 140514652397128 with data \"bird\"\n" - ] - }, - { - "data": { - "text/plain": [] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "{\n", " Vbose locvar{ \"dinosaur\" }, anothervar{\"fish\"};\n", @@ -135,29 +77,10 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "5884e24d", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Outside Lambda, S= Some string\n", - "Inside Lambda, S = 1\n", - "Outside Lambda, S= Some string\n", - "Inside Lambda, S = 2\n" - ] - }, - { - "data": { - "text/plain": [] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "{\n", " std::string S{\"Some string\"};\n", @@ -182,36 +105,10 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "id": "c9daa776", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " v = \n", - "1\n", - "4\n", - "9\n", - "16\n", - "25\n", - "36\n", - "49\n", - "64\n", - "81\n", - "100\n" - ] - }, - { - "data": { - "text/plain": [] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "{\n", " using namespace std;\n", @@ -237,76 +134,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "7cec5bf6", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " w = \n", - "1\n", - "1\n", - "2\n", - "3\n", - "5\n", - "8\n", - "13\n", - "21\n", - "34\n", - "55\n", - "89\n", - "144\n", - "233\n", - "377\n", - "610\n", - "987\n", - "1597\n", - "2584\n", - "4181\n", - "6765\n", - "10946\n", - "17711\n", - "28657\n", - "46368\n", - "75025\n", - "121393\n", - "196418\n", - "317811\n", - "514229\n", - "832040\n", - "1346269\n", - "2178309\n", - "3524578\n", - "5702887\n", - "9227465\n", - "14930352\n", - "24157817\n", - "39088169\n", - "63245986\n", - "102334155\n", - "165580141\n", - "267914296\n", - "433494437\n", - "701408733\n", - "1134903170\n", - "1836311903\n", - "2971215073\n", - "4807526976\n", - "7778742049\n", - "12586269025\n" - ] - }, - { - "data": { - "text/plain": [] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "{\n", " using namespace std;\n", @@ -326,9 +157,9 @@ ], "metadata": { "kernelspec": { - "display_name": "C++17", - "language": "C++", - "name": "cling-cpp17" + "display_name": "YourCXX", + "language": "c++", + "name": "yourcxx" }, "language_info": { "codemirror_mode": "c++", -- GitLab