DROP SCHEMA IF EXISTS RETAIL CASCADE;
CREATE SCHEMA RETAIL;
This file contains hidden or 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
| package com.morazow.pi | |
| /** | |
| * This fun example from famous SICP book for | |
| * approximating PI value. | |
| * | |
| * For more info, | |
| * https://mitpress.mit.edu/sicp/full-text/sicp/book/node72.html | |
| * | |
| */ |
This file contains hidden or 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
| def ParallelBFS(cx: Int, cy: Int, grids: Map[(Int, Int), Int]): List[Grid] = { | |
| val tasksupport = new scala.collection.parallel.ForkJoinTaskSupport( | |
| new scala.concurrent.forkjoin.ForkJoinPool(4)) | |
| var open = ParTrieMap[(Int, Int), Int]() | |
| var closed = ParTrieMap[(Int, Int), Int]() | |
| open.tasksupport = tasksupport | |
| closed.tasksupport = tasksupport |