Questions tagged [ets]

ets: Erlang Term Storage. It is a set of Erlang built in functions (BIF) that aims to provide a way to store in memory a large amount of data with constant access time. The data is stored as {Key,Value} tuples where both Key an Value may be any Erlang terms. It can be configured as ordered set, set, bag or duplicate_bag.

159 questions
0
votes
2 answers

How can I Forecast One Variable Multiple Times by One Script in R?

Suppose you have a data set that looks like this: |Month|Food|Sales| |01|Apple|1564| |02|Apple|1323| .... |12|Apple|1645| |01|Banana|2158| ... that continues on a pattern all the way to "Zucchini". So lets say you would like to forecast the sales…
GodspeedYou77
  • 23
  • 1
  • 7
0
votes
2 answers

Default model used in stlm() function in R

When forecasting of a seasonal time series is done using stlm() or stlf() in R and no model is specified, what is the default model used? Ps- I read the documentation and searched on the internet but couldn't find any lead.
Shubham Goyal
  • 17
  • 1
  • 6
0
votes
1 answer

ETS entry limit, to use as a cache server

My idea is to use ETS as a temporary cache for my GenServer state. For example when I restart my application, the GenServer state should be transported to ETS and when the application starts again, the GenServer should be able to get the state from…
webdeb
  • 12,993
  • 5
  • 28
  • 44
0
votes
1 answer

strange result when using r ets() function for analyzing CPI data

everyone. I just started to learn time series. I have the following monthly CPI data (2010.01 - 2015.12) from China. I would like to do some forecast with this data using ets() function from R. vector1 <- c(100.6, 101.2, 99.3, 100.2, 99.9, 99.4,…
Sheng Bi
  • 149
  • 4
  • 12
0
votes
1 answer

Different behaviour of ETS with and without a shell

First a disclaimer I am learning erlang. Not an expert here at all. While making some examples using ETS I came across something I am not understanding (even after searching). I have a process where I create a public ETS with TableID =…
Francesco
  • 481
  • 2
  • 4
  • 16
0
votes
1 answer

Extracting a value from an ets:lookup() - Erlang

I have a ets table formatted as below ets:new(players, [set,named_table]) The data that is put into the table is a players name and their age. It is in the format of [{Name,Age}] I made a function to try get a players age and age…
Fendec
  • 367
  • 1
  • 5
  • 23
0
votes
1 answer

Erlang ETS Match

with Erlang ets, how can Match part of key? for exmaple,ets:insert(time_tb,{ {un_known,{<<"knonw_1">>,<<"knonw_2">>} },[data]}). the key was {un_known,{<<"knonw_1">>,<<"knonw_2">>} How can I match from the table if I only knows…
user3644708
  • 2,466
  • 2
  • 16
  • 32
0
votes
0 answers

Erlang ets:insert_new for bag

In my code I want to take advantage of ETS's bag type that can store multiple values for single key. However, it would be very useful to know if insertion actually inserts a new value or not (i.e. if the inserted key with value was or was not…
0
votes
1 answer

How to replace records with maps in MatchHead of Match Specification?

An Erlang match specification supports the following pattern with record in MatchHead of Match Specification: #recordName{field1=1, field='$1', _='_'} This matches all the recordName records from a table which has field1 == 1 and also does an…
0
votes
1 answer

Using ets mnesia context for read-only operations

I have a mnesia ram_copies table replicated to all available nodes. Almost all operations using this table perform in dirty mode. What are consequences of using mnesia:foldl within ets context? mnesia:activity(ets, fun() -> mnesia:foldl(fun(V,…
citxx
  • 2,525
  • 17
  • 40
0
votes
2 answers

ETS function not working properly in Erlang

New function of ets gives back a integer instead of atom 1> A=ets:new(hello,[set]). 126999
Chaos
  • 13
  • 1
0
votes
1 answer

ets:foldl vs deleted elements

The documentation for ets:foldl/3 says: If Function inserts objects into the table, or another process inserts objects into the table, those objects may (depending on key ordering) be included in the traversal. But what happens if Function deletes…
legoscia
  • 39,593
  • 22
  • 116
  • 167
0
votes
1 answer

ETS model using Shiny

Im trying to create a web application with the new RStudio feature Shiny. I'm trying ETS state space model. I want to specify model type manually (Bold text in server.R). I'm giving inputs within quotes in server.R. If we give iputs within quotes it…
Punith
  • 623
  • 2
  • 10
  • 13
0
votes
1 answer

Union ETS tables

I try union of the two ETS tables into a single ETS table . The only way I know is to create a third table and insert the records of the two tables in a third table. Is there a better way?
0
votes
2 answers

How can I handle Account Number in erlang?

I'm making Bank Account Management system using ETS which will also hold current and savings account, I'm unable to figure it out that how can I generate and retain the series of account numbers since erlang variables are immutable. So how can I…
Umer Hassan
  • 1,119
  • 6
  • 16
  • 23
1 2 3
10
11