This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

some utils


Here are some simple definitions i often use to interface existing java
outputs (arrays) with lists.
I suggest to add them in kawa/lib/lists.scm and kawa/lib/uniform.scm

(define (array->list ary) 
  (invoke-static <gnu.lists.LList> 'makeList ary 0))

(define (float-array->uniform-vector ary :: <float[]>)
  (make <gnu.lists.F32Vector> ary))

(define (double-array->uniform-vector ary :: <double[]>)
  (make <gnu.lists.F64Vector> ary))


-- 
	(--cafe babe--) 
Marco Vezzoli	marco.vezzoli@st.com
CR&D Intranet Developement   STMicroelectronics
tel. +39 039 603 6852 fax. +39 039 603 5055


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]