Skip to content

Commit e2ebc60

Browse files
authored
Merge pull request Open-Deep-ML#345 from Open-Deep-ML/moe18-patch-3
Update README.md
2 parents fa671ec + 2ffce96 commit e2ebc60

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ DML-OpenProblem is an open-source repository of problems focused on linear algeb
99
- [Project Structure](#project-structure)
1010
- [Contributing](#contributing)
1111
- [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)
1213
- [License](#license)
1314

1415
## Installation
@@ -100,6 +101,32 @@ In the corresponding problem folder, create a `.txt` file containing the link to
100101
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.
101102

102103
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.
103130

104131
## License
105132

0 commit comments

Comments
 (0)