Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
magicCards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Letzgus
magicCards
Commits
b694582a
Commit
b694582a
authored
2 years ago
by
Eraser
Browse files
Options
Downloads
Patches
Plain Diff
Cross IDE Adjustments
parent
952e0275
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
levenD.cpp
+2
-3
2 additions, 3 deletions
levenD.cpp
main.cpp
+6
-0
6 additions, 0 deletions
main.cpp
with
8 additions
and
3 deletions
levenD.cpp
+
2
−
3
View file @
b694582a
...
...
@@ -19,9 +19,8 @@ int levenD(const std::string &s, const std::string &t) {
int
m
=
t
.
length
();
int
cost
=
0
;
//Matrix to hold the levenshtein distance
int
Matrix
[
n
+
1
][
m
+
1
];
//Matrix to hold the levenshtein distance (longest string is 174)
int
Matrix
[
175
][
175
];
// Initialize the first row and column of the matrix,[0][0] is empty
for
(
int
i
=
0
;
i
<=
n
;
i
++
)
{
Matrix
[
i
][
0
]
=
i
;
...
...
This diff is collapsed.
Click to expand it.
main.cpp
+
6
−
0
View file @
b694582a
...
...
@@ -7,6 +7,12 @@ int main() {
std
::
list
<
Cards
>
scrambledCards
;
std
::
list
<
std
::
string
>
referenceCardNames
;
/* on VsCode use this instead
//Take scrambled cards and put them in a list
scrambledCards = getListOfCards("../../scrambled.txt");
//take reference names and put them in a list
referenceCardNames = referenceNames("../../reference.txt");
*/
//Take scrambled cards and put them in a list
scrambledCards
=
getListOfCards
(
"../scrambled.txt"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment