-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement IsDeterministic and IsEpsilonFree, write tests #4
Merged
Conversation
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
danpovey
reviewed
Apr 24, 2020
danpovey
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
csukuangfj
reviewed
Apr 24, 2020
Thanks!
Lets not use braces where not necessary. I prefer code that's vertically
fairly compact (perhaps because
I tend to use a small screen...)
…On Fri, Apr 24, 2020 at 12:48 PM Fangjun Kuang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In k2/csrc/properties_test.cc
<danpovey#4 (comment)>:
> fsa.arcs = arcs;
- sorted = IsTopSorted(fsa);
- EXPECT_TRUE(sorted);
+ bool hasSelfLoops = HasSelfLoops(fsa);
The same for line 48.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<danpovey#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFLO5Z5QRS4Q7MXBMQP4TROEKY5ANCNFSM4MPYW4XA>
.
|
variables should be like_this.
…On Fri, Apr 24, 2020 at 12:48 PM Fangjun Kuang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In k2/csrc/properties_test.cc
<danpovey#4 (comment)>:
> fsa.arcs = arcs;
- sorted = IsTopSorted(fsa);
- EXPECT_TRUE(sorted);
+ bool hasSelfLoops = HasSelfLoops(fsa);
+ EXPECT_TRUE(hasSelfLoops);
+}
+
+TEST(Properties, IsNotDeterministic) {
+ std::vector<Arc> arcs = {{0, 1, 2}, {1, 2, 0}, {1, 3, 0}, };
+ std::vector<Range> leaving_arcs = {{0, 1}, {1, 3}, };
+ Fsa fsa;
+ fsa.leaving_arcs = leaving_arcs;
+ fsa.arcs = arcs;
+ bool isDeterministic = IsDeterministic(fsa);
the naming style for variables should be consistent.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<danpovey#4 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFLO7IKKKPYFV5V4XQ7T3ROEK2RANCNFSM4MPYW4XA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.