Questions tagged [iterated-function]

47 questions
3
votes
0 answers

Is there a known algorithm to convert L-Systems to Iterated Function Systems?

The problem statement is as follows: "Given an L-System with an alphabet set, an axiom, a set of rewriting rules, and a set of geometric rules in bijection with the alphabet set, how do we find the equivalent set of Iterated Function System (IFS)…
3
votes
2 answers

Extract number of raster cells included in a SpatialPolygons

I would like to create a function to count the number of raster cells within the polygons of a SpatialPolygonsDataframe object and adding the value as a new column without using a loop. I cannot find how to do it... Here is my…
Marion LT
  • 31
  • 2
2
votes
2 answers

Recursively iterate over a nested object to change a key value on all occurrences

There is an input structure with rules nested inside other rules. In the rules array, wherever there is a 'data' property, its value has to be changed to "foo" Sample input objects: {condition: 'and', rules: [{data: '123'}]} {condition: 'or',…
Rk R Bairi
  • 1,289
  • 7
  • 15
  • 39
2
votes
2 answers

Iterate over
  • and replace text with jquery
  • I have the following HTML structure:
    • Text 1
    • Text 2
    • Text 3
    • Text 4
    • Text 5
    I want to find a string containing "4"…
    2
    votes
    3 answers

    Show data type of all the elements in the array

    I have an array array:23 [▼ "cpe_mac" => "204492519985" "bandwidth_max_up" => 30000 "bandwidth_max_down" => 50000 "filter_icmp_inbound" => true "dmz_enabled" => false "dmz_host" => "http:\/\/ddd.com" "vlan_id" => 2 "dns" => array:2…
    code-8
    • 54,650
    • 106
    • 352
    • 604
    2
    votes
    2 answers

    How to fetch a subgraph of first neighbors in neo4j?

    I fetch first n neighbors of a node with this query in neo4j: (in this example, n = 6) I have a weighted graph, and so I also order the results by weight: START start_node=node(1859988) MATCH start_node-[rel]-(neighbor) RETURN DISTINCT…
    user305883
    • 1,635
    • 2
    • 24
    • 48
    1
    vote
    2 answers

    How do I compare similar file names with timestamps in the names to see which is the newest in Bash?

    I am new to Bash scripting and I'm open to constructive criticism and want to learn. I'm working on a bash script to automate moving Backup files to an archive server. The plan is to run the script monthly to copy backups from storage server 1 to…
    Jake
    • 19
    • 7
    1
    vote
    1 answer

    Spark Iterated Function CUSUM

    I'm still fairly new to Spark and I'm struggling to implement an iterated function. I'm hoping someone can help me out? In particular, I'm trying to implement the CUSUM control statistic: $ S_i = \max (0, S_{i-1} + x_i - Target - w $ with $ S_0 = 0…
    1
    vote
    1 answer

    Neo4J - find if value in array property of 2 nodes matches

    Hi I have a use case where I have a node with property which is array. * Node({name:'a', colors:['red','green','blue']}) Node({node:'b',colors:['blue','black','red']}) * Now I want to find out what is matching value between 2 nodes among their…
    Manohar CS
    • 31
    • 8
    1
    vote
    2 answers

    How to apply a function over a list using previous outputs as arguments?

    I have a function f :: (a -> a) -> a -> ((a -> a), a). (In the specific case a is Int, but that is irrelevant.) I have a function initial :: a -> a, and a list of inputs (inputs :: [a]). I need to apply f to all the elements of inputs, but, for…
    Mark Anastos
    • 365
    • 3
    • 14
    1
    vote
    0 answers

    Iterated copy & paste VBA macro based on cell contents

    Good Morning, Please see the photo for context of my problem, I have also tried to start the VBA code - any help would be much appreciated! My truncated data set - There is an unknown number of applications and projects. I am trying to work out,…
    1
    vote
    1 answer

    Python / Updating panda row with new column value from function

    Python 2.7 I am trying to write the result of a "robot check" (although I suppose this applies in other circumstances) where I am iterating over a data frame. I have tried import robotparser import urlparse import pandas as pd df =…
    Pat Stroh
    • 189
    • 1
    • 3
    • 10
    1
    vote
    4 answers

    Iterate over an array of objects only once

    $(document).ready(function() { allQuestions is the array of objects, which role is providing the questions(question), the answers(choices) and the correct response(correctAnswer) for my app. var allQuestions = [{question: "If you were a…
    Bacchus
    • 515
    • 8
    • 22
    1
    vote
    1 answer

    How to sum two variables: constant and iterated in text input's "name"?

    I have a function: