Skip to content

Commit 9bc500c

Browse files
tharun571vgvassilev
authored andcommitted
Update tutorials documentation
1 parent f27514e commit 9bc500c

File tree

4 files changed

+6
-42
lines changed

4 files changed

+6
-42
lines changed

docs/source/fibonacci.png

27.6 KB
Loading

docs/source/integration-demo.png

-600 KB
Binary file not shown.

docs/source/sum.png

-11.9 KB
Binary file not shown.

docs/source/tutorials.rst

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Tutorials
22
---------
33

44
This tutorial emphasises the abilities and usage of Xeus-cpp. Let's get
5-
started! The tutorial demonstrates examples of C++ and C++-python integration
5+
started! The tutorial demonstrates examples of C++
66
on Jupyter kernels.
77

88
1. Install the xeus-cpp from source using conda-forge for fetching dependencies.
99

10-
2. Launch the Jupyter Notebook with C++-14, C++-17 kernels available.
10+
2. Launch the Jupyter Notebook with C++-11, C++-14, C++-17 kernels available.
1111

1212
3. In a code cell, write the C++ code.
1313

@@ -17,53 +17,17 @@ on Jupyter kernels.
1717
C++
1818
===
1919

20-
.. image:: sum.png
20+
.. image:: fibonacci.png
2121
:width: 200px
2222
:height: 100px
23-
:scale: 250 %
23+
:scale: 300 %
2424
:align: center
2525

2626
In this example, you can modify the code and execute the cell again to see the
27-
updated results. For example, you might change the values of `a` and `b`
28-
(function arguments) of the function `sum` to see expected output. You can try
27+
updated results. For example, you might change the values of `n``
28+
(function arguments) of the function `nthFibonacci` to see expected output. You can try
2929
out different examples to explore the features of C++.
3030

3131
The output of the cell will be displayed below once the code is executed and
3232
xeus-cpp provides an interactive environment, where you can promptly make
3333
the changes and prototype in C++.
34-
35-
C++-Python Integration:
36-
=======================
37-
38-
.. image:: integration-demo.png
39-
:width: 200px
40-
:height: 100px
41-
:scale: 400 %
42-
:align: center
43-
44-
In this example, we are emphasising the concept of C++-Python integration, where
45-
we use Python and C++ in the same session, sharing variables, scopes, and features.
46-
Here, we have used variables (`new_var1`, `new_var2`, `new_var3`)
47-
in python which have been initialised in C++. In the following context, we have
48-
tried the vice versa as well of using the variables in Python (`new_python_var`)
49-
which have been defined in C++.
50-
51-
.. code-block:: bash
52-
53-
In[1] #include <iostream>
54-
55-
In[2] void Cpp() {
56-
std::cout << "Hello World C++!" << std::endl;
57-
}
58-
59-
In[3] %%python
60-
61-
In[4] Cpp()
62-
63-
We are taking another example of working with functions that can be used in
64-
to call functions defined in C++ in python code with help of magic commands.
65-
66-
The project is under development and is subject to changes as C++-Python integration
67-
within the same Jupyter cell is quite challenging. Please ensure that you have
68-
xeus-cpp and your Jupyter environment set up before attempting to run C++
69-
code. The installation instructions can be found in this documentation for xeus-cpp.

0 commit comments

Comments
 (0)