Questions tagged [reducing]
37 questions
1
vote
1 answer
Reducing memory requirements of a pyomo model
I am building a big pyomo model with over 1 million constraints and 2 million variables.
And I am looking for suggestions to reduce the memory requirements of the model that I am building.
At the moment it requires over 20gb's of RAM.
How would I…

oakca
- 1,408
- 1
- 18
- 40
1
vote
1 answer
Excel drop down list created from col A: number and col B: item, then reducing options
I would like to list all the fruits in my basket, then give fruits to my friends, and doing so options in the drop-down list are reducing automatically.
Column A: number of fruits
Column B: fruits
Column C: names
Column D: dropdown list
For…

user3019338
- 75
- 3
- 13
1
vote
8 answers
Reducing IF statement java
i am trying to make a unit converter using javafx - i've been searching around for two days on how can i reduces these if-statements. somehow, i found some similar issue but it didn't help me since i am new with Java - i do not know the right…

i-faith
- 449
- 1
- 3
- 14
0
votes
1 answer
Reducing an Object Array
How can I convert this input
const input = [
{"attributeGroup":"Compliance Information", "name":"specification", "value": "Medium"},
{"attributeGroup":"Compliance Information", "name":"specification", "value": "High"},
…

Abdul Manan Ali
- 1
- 2
0
votes
1 answer
Reducing code for iterating over the same list with nested for loops but with different variables
Is there any in build python iterating tool that reduces 3 row of for loops into one row?
Here are the nested for loops that I want to reduce.
some_list = ["AB", "CD", "EF", "GH"]
for word_1 in some_list:
for word_2 in some_list:
for…

Martin
- 3
- 3
0
votes
2 answers
Time Complexity of a Recursive Function with a Reducing Parameter
int func (int n, int m)
{
if (n<1)
return n;
else if (n<10)
return func(n-m, m);
else
return func(n-1, m);
}
This is the function. What's the big O notation and how can I calculate it? I'm new to this.
Is…

byraychen
- 43
- 7
0
votes
1 answer
Java-Stream Collectors.reducing - cannot infer type-variable(s) T
This is my Employee class:
@AllArgsConstructor
@Getter
public static class Employee {
public enum Gender {
MALE, FEMALE
}
private long id;
private String name;
private Gender gender;
private LocalDate dob;
…

Pranjal
- 31
- 3
0
votes
2 answers
Correct syntax for Collectors.reducing
I have an Order class and a LineItem class like below:
@AllArgsConstructor
@Getter
@ToString
static class Order {
long orderId;
List lineItems;
}
@AllArgsConstructor
@Getter
@ToString
static class LineItem {
String name;
…

bbKing
- 179
- 1
- 8
0
votes
0 answers
Reducing nested loops in C++
for(int i=1; i<=a;i++){
for(int j=1;j<=b;j++){
if((i+j)%2 == 0){
count++;}}}
Can anyone reduce the Time complexity of this problem? I am finding great difficulty in doing it.

Chandrachud Pati
- 425
- 1
- 5
- 12
0
votes
2 answers
Java: is there more elegant way to extract a new list from an existing list using reduce?
I'm trying to take a list of elements, make some manipulation on part of these elements and put the output of these manipulations in a new list.
I want to do it with only one iteration on the list.
The only way I found to do it is:
List…

CrazySynthax
- 13,662
- 34
- 99
- 183
0
votes
2 answers
Why the remaining credit amount is reducing although I'm not using the VMs?
I've "Visual Studio Enterprise" azure subscription. I initially got few credits. I think it was $200 for free. Earlier it used to show static remaining credit i.e. if I built two VMs and it cost $50 it would show $150. But since few days may be just…

The Shooter
- 733
- 3
- 9
0
votes
3 answers
R: One value per hour in data frame
I've got a GPS dataset with about 5600 rows of coordinates from 5 GPS devices ('nodes') over several days and I want to reduce the number of GPS points to just one point per hour. Because the number of points per hour fluctuates, a simple for-loop…

sequoia
- 480
- 2
- 13
0
votes
0 answers
How to MapReduce with Web Logs?
I'm new in Hadoop.
I want to analyze Web logs using MapReduce.
I'll use sample web logs
like this.
211.36.215.78 / [08:Jun:2017:18:00:09] / Link1 / URL1
210.100.139.14 / [08:Jun:2017:20:10:10] / Link1 / URL2
How to analyze 'the number of users…

B.Sung
- 71
- 1
- 2
- 6
0
votes
1 answer
Combining data sets without losing observations in SAS
Hye guys,
I know, another post another problem :D :(.
I took a screenshot to easily explain my problem.
http://i39.tinypic.com/rhms0h.jpg
As you can see I want to merge two tables (again), the Base & Analyst table. What I want to achieve is…

John
- 47
- 1
- 3
- 7
0
votes
3 answers
Stop number decrease once 0 reached - Python
I am working on a small game in pygame and I have set up a health variable so each time my player gets hit by an enemy ship my health decreases by 25, however sometimes (If I my player rapidly across the screen) I am able to get this below 0 and it…

Oscar
- 97
- 4
- 14