Download Jar. Uses 3874K of libraries. Click here for Pure Java version (15225L/109K).
1 | !7 |
2 | |
3 | static int limit = 1000000; // How many steps for search |
4 | |
5 | sS inputDiagrams = [[ |
6 | CirclesAndLines(circles=[Circle(text="Find", x=d("0.27089337175792505"), y=d("0.18181818181818182")), Circle(text="an integer", x=d("0.5965417867435159"), y=d("0.19922630560928434")), Circle(text="odd", x=d("0.5360230547550432"), y=d("0.528046421663443")), Circle(text="prime", x=d("0.8011527377521613"), y=d("0.5164410058027079"))], lines=[Arrow(a=t5, b=t26, text=""), Arrow(a=t26, b=t47, text="that is"), Arrow(a=t26, b=t68, text="that is")]) |
7 | CirclesAndLines(circles=[Circle(text="A standard function that enumerates", x=d("0.3011527377521614"), y=d("0.2688588007736944")), Circle(text="integers", x=d("0.5561959654178674"), y=d("0.4448742746615087")), Circle(text="\"enumerateIntegers\"", x=d("0.7521613832853026"), y=d("0.6808510638297872"))], lines=[Arrow(a=t5, b=t26, text=""), Arrow(a=t26, b=t47, text="is")]) |
8 | CirclesAndLines(circles=[Circle(text="A standard function that tests", x=d("0.3645533141210375"), y=d("0.2011605415860735")), Circle(text="an integer", x=d("0.2377521613832853"), y=d("0.5764023210831721")), Circle(text="odd", x=d("0.47982708933717577"), y=d("0.5725338491295938")), Circle(text="\"odd\"", x=d("0.7132564841498559"), y=d("0.562862669245648"))], lines=[Arrow(a=t5, b=t26, text="what"), Arrow(a=t5, b=t47, text="for property"), Arrow(a=t5, b=t68, text="is")]) |
9 | CirclesAndLines(circles=[Circle(text="A standard function that tests", x=d("0.3645533141210375"), y=d("0.2011605415860735")), Circle(text="an integer", x=d("0.2377521613832853"), y=d("0.5764023210831721")), Circle(text="prime", x=d("0.47982708933717577"), y=d("0.5725338491295938")), Circle(text="\"isPrime\"", x=d("0.7132564841498559"), y=d("0.562862669245648"))], lines=[Arrow(a=t5, b=t26, text="what"), Arrow(a=t5, b=t47, text="for property"), Arrow(a=t5, b=t68, text="is")]) |
10 | ]]; |
11 | |
12 | p-subst { |
13 | L<Web> webs = websFromCALStructures(inputDiagrams); |
14 | JLabel lblAnswer = setFontSize(20, jcenteredlabel("Computing...")); |
15 | showTabbedWebs(concatArrays( |
16 | web_userWebsForTabs2(webs), |
17 | litObjectArray("Answer", lblAnswer))); |
18 | |
19 | ai_find1(web_addWebs(webs), limit); |
20 | setText(lblAnswer, ai_search1_resultText!); |
21 | } |
Began life as a copy of #1010221
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010224 |
Snippet name: | Find an odd prime [OK] |
Eternal ID of this version: | #1010224/17 |
Text MD5: | d7847c48ed0f0c0ce9bf557739324f77 |
Transpilation MD5: | 4cdd570ab03427752b29d175625edf72 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-07 01:05:42 |
Source code size: | 2214 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 627 / 1234 |
Version history: | 16 change(s) |
Referenced in: | [show references] |