Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Which is better?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jake Dempsey  
View profile  
 More options Oct 23, 2:24 pm
From: Jake Dempsey <angelo0...@gmail.com>
Date: Fri, 23 Oct 2009 11:24:20 -0700 (PDT)
Local: Fri, Oct 23 2009 2:24 pm
Subject: Which is better?
    rule :Rule_Name,
      [Class, :c1, m.method_that_returns_array(&c{|x| x.include?
("VALUE")})],
      [Class2, :c2, m.type == "TYPE", m.relationship == b(:c1)] do |v|
      puts "found it"
    end

    rule :Rule_Name2,
      [Class2, :c2, m.type == "TYPE", m.relationship(&c{|x|
x.method_that_returns_array.include?("SHUTTLE")})] do |v|
      puts "found it"
    end

Is the first better because it doesnt have to execute the block on all
Class2 objects in the working memory?  In the first approach I have to
assert each Class2 object and also assert its associated Class1
object.  Doing this allows me to first scope by Class1.  My assumption
is that if i have fewer Class1 objects it would be better to use the
first approach.  Also, is my approach for arrays correct here?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Kutner  
View profile  
 More options Oct 23, 3:38 pm
From: Joe Kutner <jpkut...@gmail.com>
Date: Fri, 23 Oct 2009 14:38:43 -0500
Local: Fri, Oct 23 2009 3:38 pm
Subject: Re: [ruleby] Which is better?
Yes, the first rule would be better.  It allows the engine to cache
matches of Class1.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google