Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A fast way to compare two vectors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121729] Re: A fast way to compare two vectors
  • From: Yasha Gindikin <gindikin at gmail.com>
  • Date: Wed, 28 Sep 2011 02:45:45 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j5m44t$ple$1@smc.vnet.net> <j5mt5u$smm$1@smc.vnet.net> <j5r46e$ibt$1@smc.vnet.net>
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Dear Oleksandr, thank you for your kind explanations. I would be happy if the compiled function simply returned the values of diffs1 and diffs2. Assigning values to global variables is not obligatory for me, especially if it is time-consuming.

Unfortunately, there are problems. Trying to calculate the compiled functio n hyperfastVectorCompare[a, b, 4] with a = {1, 2, 3, 4, 5} and b = {1, 2, 6, 7, 12} yields "CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled evaluation", with the returned values being {{3, 4, 5}, {3}}.

It looks like that when local variables diffs1 and diffs2 have different length, the compiled function can not return those.

Is there any chance for the compiled function to return the local variables of different length (diffs1, diffs2 and diffct), without assigning those to the global variables? Thank you!




  • Prev by Date: Re: More FinancialData glitches
  • Next by Date: Re: Constrain locator
  • Previous by thread: Re: A fast way to compare two vectors
  • Next by thread: Manipulate for differences tables. Can I call as function?