Questions tagged [lookup-tables]

A look-up table is an array or matrix of data that contains items that can be searched. Lookup tables may be arranged as key-value pairs, where the keys are the data items being searched (looked up) and the values are either the actual data or pointers to where the data are located.

A look - up table is an array or matrix of data that contains items that are searched. Lookup tables may be arranged as key-value pairs, where the keys are the data items being searched (looked up) and the values are either the actual data or pointers to where the data are located.

798 questions
5
votes
2 answers

Compute logarithmic expression without floating point arithmetics or log

I need to compute the mathematical expression floor(ln(u)/ln(1-p)) for 0 < u < 1 and 0 < p < 1 in C on an embedded processor with no floating point arithmetics and no ln function. The result is a positive integer. I know about the limit cases (p=0),…
mqtthiqs
  • 445
  • 3
  • 9
5
votes
2 answers

Change values in multiple columns of a dataframe using a lookup table

I am trying to change the value of a number of columns at once using a lookup table. They all use the same lookup table. I know how to do this for just one column -- I'd just use a merge, but am having trouble with multiple columns. Below is an…
verybadatthis
  • 1,448
  • 2
  • 14
  • 32
5
votes
1 answer

Django: Setting up database code tables (aka reference tables, domain tables)?

Often times applications will need some database code tables (aka reference tables or domain tables or lookup tables). Suppose I have a model class called Status with a field called name that could hold values…
User
  • 62,498
  • 72
  • 186
  • 247
5
votes
1 answer

Lookup tables in Go?

Would this be an appropriate way to implement an lookup table in Go? Are there any better ways? I'd like this to work if the entries happened to be nonconsecutive. func LookupRpMax(val uint8) float64 { rpMaxRegisters := map[uint8]float64 { …
strobot
  • 157
  • 1
  • 6
5
votes
4 answers

Lookup Tables in Java?

In my Computer Science course, we're learning about Lookup Tables. But our teacher did not provide any examples in the lesson pages he has posted, nor the videos he provided. All he did was tell us what it was but he wants us to use them in our next…
Garrett Outlaw
  • 215
  • 3
  • 6
  • 16
5
votes
3 answers

Declare and populate a hash table in one step in Perl

Currently when I want to build a look-up table I use: my $has_field = {}; map { $has_field->{$_} = 1 } @fields; Is there a way I can do inline initialization in a single step? (i.e. populate it at the same time I'm declaring it?)
Brad Mace
  • 27,194
  • 17
  • 102
  • 148
5
votes
2 answers

How to join multiple tables including lookup table and return data in rows

I'm trying to display some simple computer game results and make it easy to iterate through the results line by line in my code. I want it so that all the relevant data for each game is in each record so I can output it all on the one line…
zuallauz
  • 4,328
  • 11
  • 43
  • 54
5
votes
4 answers

Square/cubic root lookup table

I'm wondering which is the best way to create two lookups table for square root and cubic root of float values in range [0.0, 1.0). I already profiled the code and saw that this is quite a strong bottleneck of performances (because I need to compute…
Jack
  • 131,802
  • 30
  • 241
  • 343
4
votes
2 answers

Simple lexical analysis java program

My little project is a lexical analysis program in which i have to take every word found in an arbitrary .java file and list every line it appears on in the file. I need to have one look up table dedicated just to the reserved words and another for…
user1152918
  • 71
  • 1
  • 1
  • 3
4
votes
2 answers

JPA Lookup table design

I have a design dilemma at my hands and am hoping you guys could help me out with this. Problem: I have about 15 lookup tables for my application each with code and value attributes. I was wondering what would be the best design approach for…
JProgrammer
  • 321
  • 4
  • 15
4
votes
3 answers

I want to map my database lookup tables to a hash, good idea?

I am developing a Rails web application and am confused about how to utilize the lookup table values in my models. Here is an example model from my app: table name:…
JimDaniel
  • 12,513
  • 8
  • 61
  • 67
4
votes
0 answers

How to set datasource programatically of dxo-lookup

I have dx-data-grid with 3 columns. Two of them are with dxo-lookups. the dataSource of one of them relay on the value of the other. On what event should i set the datasource of this lookup programatically What i done so far is: I catch…
Javorov1103
  • 119
  • 1
  • 9
4
votes
4 answers

Efficiency of arcsin computation from sine lookup table

I have implemented a lookup table to compute sine/cosine values in my system. I now need inverse trigonometric functions (arcsin/arccos). My application is running on an embedded device on which I can't add a second lookup table for arcsin as I am…
greydet
  • 5,509
  • 3
  • 31
  • 51
4
votes
1 answer

What is the best way to find all occurrences of values from one dataframe in another dataframe?

I am working on a spark cluster and I have two dataframes. One contains text. The other is a look-up table. Both tables are huge (M and N both could easily exceed 100,000 entries). What is the best way to match them? Doing a cross-join then…
tooskoolforkool
  • 192
  • 1
  • 9
4
votes
3 answers

r replace text within a string by lookup table

I already have tried to find a solutions on the internet for my problem, and I have the feeling I know all the small pieces but I am unable to put them together. I'm quite knew at programing so pleace be patient :D... I have a (in reality much…
Solana
  • 55
  • 5