You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ DML-OpenProblem is an open-source repository of problems focused on linear algeb
9
9
-[Project Structure](#project-structure)
10
10
-[Contributing](#contributing)
11
11
-[How to Add an Interactive Learn for a Problem](#how-to-add-an-interactive-learn-for-a-problem)
12
+
-[How to Add C++ Questions](#how-to-add-c-questions)
12
13
-[License](#license)
13
14
14
15
## Installation
@@ -100,6 +101,32 @@ In the corresponding problem folder, create a `.txt` file containing the link to
100
101
3.**Submit Changes**: Commit the new folder with its contents to your branch and submit a pull request. Ensure your commit messages clearly indicate the addition of the interactive learn for the problem.
101
102
102
103
4.**Collaborate for Review**: Engage with reviewers for feedback on your pull request. Make any necessary adjustments as suggested.
104
+
## How to Add C++ Questions
105
+
106
+
We are adding C++ support to the problem set, and you can contribute C++ solutions following these guidelines.
107
+
108
+
### Steps to Add a C++ Solution
109
+
110
+
1.**Select a problem** from the existing Python-based problems.
111
+
2.**Create a C++ solution file** inside the corresponding problem folder, naming it `solution.cpp`.
112
+
3.**Follow the C++ coding guidelines**:
113
+
- Use **C++17 or later**.
114
+
- Prefer **Eigen** for matrix operations (or xtensor-blas if necessary).
115
+
- Ensure **well-structured, readable, and modular code**.
116
+
- Keep solutions **self-contained** and avoid unnecessary external dependencies.
117
+
- Format numerical outputs to **4 decimal places** for consistency.
118
+
4.**Test your solution** to ensure correctness.
119
+
5.**Submit a pull request** with a detailed explanation of your solution.
120
+
121
+
### C++ Coding Rules
122
+
123
+
- Use **Eigen** for matrix computations where applicable.
124
+
- Avoid **excessive STL usage** unless necessary for clarity.
125
+
- Prefer **pass-by-reference** over pass-by-value to improve performance.
126
+
- Ensure **error handling** without crashing the program.
127
+
- Keep solutions **deterministic** and **efficient**.
128
+
129
+
If you have any questions about library choices or implementation details, feel free to start a discussion in the GitHub issues section.
0 commit comments