-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lecture3 slides and update figures for lecture 2
- Loading branch information
Showing
8 changed files
with
194 additions
and
11,134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"metadata":{"kernelspec":{"display_name":"C++17","language":"C++17","name":"xcpp17"},"language_info":{"codemirror_mode":"text/x-c++src","file_extension":".cpp","mimetype":"text/x-c++src","name":"c++","version":"17"},"rise":{"autolaunch":true,"enable_chalkboard":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Object-oriented scientific programming with C++\n\nMatthias Möller, Jonas Thies (Numerical Analysis, DIAM)\n\nLecture 1","metadata":{"editable":false,"raw_mimetype":"","slideshow":{"slide_type":"slide"},"tags":[]},"attachments":{}},{"cell_type":"markdown","source":"## What's this course about","metadata":{"editable":false,"slideshow":{"slide_type":"slide"},"tags":[]}},{"cell_type":"markdown","source":"### Object oriented programming\n\nLearn the **design principles** of OOP (not restricted to C++)","metadata":{"slideshow":{"slide_type":"subslide"},"tags":[]}},{"cell_type":"markdown","source":"### Matlab example\n\n```Matlab\nA = [1 2; 3 4]\nsize(A)\n```\n\nHere, the `size` **functions** is applied to the matrix `A` and determines its size from outside. That means the function `size` must be able to deduce the matrix size. In other words, the matrix size is publicly visible.","metadata":{"editable":false,"slideshow":{"slide_type":"subslide"},"tags":[]}},{"cell_type":"markdown","source":"### Python example\n\n```python\nA = numpy.matrix([[1, 2], [3, 4]])\nA.shape\n```\n\nHere, the matrix `A` provides a _member function_ to determine its size from inside.","metadata":{"editable":false,"slideshow":{"slide_type":"subslide"},"tags":[]}},{"cell_type":"markdown","source":"### Header files\n\nAt the beginning of each C++ code you include some **header files**, for instance the one for input and output streams","metadata":{"editable":false,"slideshow":{"slide_type":"slide"},"tags":[]}},{"cell_type":"code","source":"#include <iostream>","metadata":{"editable":true,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":false},"outputs":[],"execution_count":2},{"cell_type":"markdown","source":"Now, we can write our first C++ instruction","metadata":{"editable":false,"slideshow":{"slide_type":"fragment"},"tags":[]}},{"cell_type":"code","source":"std::cout << \"Hello World!\\n\";","metadata":{"editable":true,"slideshow":{"slide_type":"fragment"},"tags":[],"trusted":false},"outputs":[{"name":"stdout","output_type":"stream","text":"Hello World!\n"}],"execution_count":3}]} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.