Lately, I find myself repeatedly comparing pairs in arrays.
I usually do something like:
d =: 3 : '-/1 }. y ,. 0 , }: y'
d i. 5
1 1 1 1
It feels like I'm reinventing the wheel but I couldn't find a simpler way
(and more efficient for large arrays) to apply u over each pair of v.
Is there
9
┌───┬───┬───┬───┬───┐
│3 1│1 4│4 1│1 5│5 9│
└───┴───┴───┴───┴───┘
2 -/\ 3 1 4 1 5 9
2 _3 3 _4 _4
On Fri, Aug 14, 2015 at 7:30 AM, Yoel Jacobsen yoel.jacob...@gmail.com
wrote:
Lately, I find myself repeatedly comparing pairs in arrays.
I usually do something like
I tried to follow Dan Baronet's A tool of thought in the latest Vector
(26, 23). It's about solving Kankuro puzzles:
Find all sets of N unique positive single digit numbers (1..9) making the
sum S.
I tried from scratch with J:
sol =: dyad define
p =. (i.!9) A. : i. 9
c =. ~. /:~1 (x {.1 p)
k
Ns=: +/1 *sets
sol=:4 :0
0 -.1~ sets #~ (x=Ns)*y=sums
)
4 sol 12
1 2 4 5
1 2 3 6
timespacex '4 sol 12'
2.8e_5 9472
timespacex '9 sol 45'
1.6e_5 8960
Seems efficient enough to me?
Thanks,
--
Raul
On Sat, Aug 8, 2015 at 4:12 PM, Yoel Jacobsen yoel.jacob...@gmail.com
if you were already working with sorted data, you
could eliminate the @/:~
Thanks,
--
Raul
On Tue, Jul 28, 2015 at 12:57 PM, Yoel Jacobsen yoel.jacob...@gmail.com
wrote:
Hello,
Long list of questions, apology in advance...
I'm playing with Jd by trying to use it as an analytical
Brian,
I wasn't aware of 13: . Thank you.
Yoel
From Brian Schott schott.br...@gmail.com
Have you tried the 13 : feature like this?
13 : '(x .@* :@# y){/:~y'
([ .@* [: :@# ]) { [: /:~ ]
--
(B=) -my sig
Brian Schott
8, 2015 at 4:32 PM, Yoel Jacobsen yoel.jacob...@gmail.com
wrote:
Hello there,
Is there a way to combine preemption, checkpointing and automatic requeue?
The behavior I try to configure is:
- Submit a batch job with checkpointing (based on BLCR)
- On preemption - take a checkpoint and kill
--
To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300efyxkue...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300egixkye...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-powerpc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300efyxkue...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-powerpc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300egixkye...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300efyxkue...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m6300egixkye...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-powerpc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m1l00k8errfy...@davar.emet.co.il
--
To UNSUBSCRIBE, email to debian-powerpc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/0m0x007cnflr1...@davar.emet.co.il
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
___
wxhaskell-users mailing list
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
___
wxhaskell-users mailing list
How can I append each element of the RHS list to each element of the LHS list?
Example:
a =. 1 2 3
b =. 10 20 30
I would like a to achieve: a something b that will result in:
1 10 1 20 1 30
2 10 2 20 2 30
3 10 3 20 3 30
I have experimented with ,. and ,: without success.
What did I miss?
Thank you.
I eventually did this:
a ,@,.(0 _) b
Yoel
On Fri, Feb 15, 2008 at 9:18 AM, Chris Burke [EMAIL PROTECTED] wrote:
Yoel Jacobsen wrote:
How can I append each element of the RHS list to each element of the LHS
list?
Example:
a =. 1 2 3
b =. 10 20 30
I would
This 'apply' should be added to the phrases doc...
Thanks!
On Jan 17, 2008 6:23 PM, Dan Bron [EMAIL PROTECTED] wrote:
Yoel wrote:
Is there a way for instance, to apply ;:'[ [ |:' to (i.10 10);(i. 10
10); i.10 10 ?
Jose responded:
(']';']';'|:') apply . T
The master struck the
Hello,
I want to implement matrix approximation using SVD.
The SVD algorithm returns three boxed matrices of the shapes x x ; x y ; y y
I want to chop and multiply back:
Step 1: reshape as - x M; M M ; M y where M is a small value
Step 2: Unbox and multiply (x M * M M * M y = x y)
My current
Hello,
It seems to me that the SVD implementation from
~system\packages\math\svd.ijs is inefficient for large matrices (i.e.
calculating the SVD of the color matrices of an 640x500 image never
ends..).
You may even try: $ svd i. 200 200
(in NumPy it takes less than a second)
Before I reinvent
I have tryed it on a 1.2GB file. Since my laptop has only 1GB RAM I have
killed the process when it consumed 500MB (and rising).
Yoel
On 5/15/06, Henry Rich [EMAIL PROTECTED] wrote:
Try
x ([: I. E.) y
--
For information
'sizes =: delim (_1: . (] i.1 [) {.0 1 ]) (tagis +/
(#tag)+i. 12){mls'
0.431585 1.37452e7
$sizes
43947
+/ x: sizes
11572953524
Maybe these are some ideas you can use to attack your problem.
- joey
At 11:01 +0300 2006/05/14, Yoel Jacobsen wrote:
Hello,
I'm new to J so please forgive me
Some of the clients of the company I'm working for, are working with up to
Terabyte-long files. Usually in Physics, life-science,simulation etc.
The new file system in Solaris (ZFS) is a 128bit FS.
Anyway, data mining from log files is an important use of a language for me.
I am very pleased
Hello,
I'm new to J so please forgive me if this is a FAQ.
I wrote some short sentences to parse a log file. I want to retrieve all the
unique values of some attribute. The way it shows in the log file is
attribute nameSPACEattribute value such as . csn 92892849893284
...
My initial (brute
2006/5/14, Yoel Jacobsen [EMAIL PROTECTED]:
Hello,
I'm new to J so please forgive me if this is a FAQ.
I wrote some short sentences to parse a log file. I want to retrieve all
the
unique values of some attribute. The way it shows in the log file is
attribute nameSPACEattribute value
Even for regex, I don't see how to avoid manually reading the file in chunks
which is too imperative style for me. Again, consider the Python example:
for line in file.readlines():
match_object = re.search((= csn )\w+, line)
if match_object:
process(match_object.group(0))
The regex can be
),(DateOfCallString,20050315)]),(SVCL,[(CustomerName,TWO
x),(CustomerID,10301),(CallTypeCode,MRP2),(DateOfCallString,20050329)]),(USGE,[(CustomerID,10301),(CustomerName,TWO
x),(Cycle,7),(ReadDAte,050329)])]
*Main
Yoel Jacobsen wrote:
It seems that Martin Fowler's article Language
Hi David,
Thank you for the reference. The problem with this attitude is that the
configuration structure is static. I would like to be able to construct
the record structure dynamically from the configuration file..
Yoel
David Menendez wrote:
Yoel Jacobsen writes:
It seems that Martin
It seems that Martin Fowler's article Language Workbenches: The
killer-App for Domain Specific Languages? -
http://www.martinfowler.com/articles/languageWorkbench.html - has
generated some nice dynamic solution where a configuration file is
written in the same language as the program. Notable
Hello,
I have a weird situation. I've defined a clean and short XF86Config
file. It defines two modes 1152x864 and 1024x768 and a single 16 bit
Display.
The weird thing is that it is works perfectly with kernel 2.4.x and
with the 2.2.19 supplied with potato it fails telling me the
33 matches
Mail list logo