We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using version 0.2.0-alpha6.
In the following, a list of size 1 is sliced to make another list of size 1 that is then correctly made linear.
Then, a list of size 2 is sliced into a list of size 1. This new list is attempted to be made linear but that fails.
import io.lacuna.bifurcan.IList; import io.lacuna.bifurcan.LinearList; public class Main { public static void main(String[] args) { LinearList<Integer> list1 = new LinearList<>(); list1.addLast(1); IList<Integer> slice1 = list1.slice(0, 1).linear(); System.out.println("Slice 1 is linear: " + slice1.isLinear()); LinearList<Integer> list2 = new LinearList<>(); list2.addLast(1); list2.addLast(2); IList<Integer> slice2 = list2.slice(0, 1).linear(); System.out.println("Slice 2 is linear: " + slice2.isLinear()); } }
The output is:
Slice 1 is linear: true Slice 2 is linear: false
The output should be:
Slice 1 is linear: true Slice 2 is linear: true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using version 0.2.0-alpha6.
In the following, a list of size 1 is sliced to make another list of size 1 that is then correctly made linear.
Then, a list of size 2 is sliced into a list of size 1. This new list is attempted to be made linear but that fails.
The output is:
The output should be:
The text was updated successfully, but these errors were encountered: