Questions tagged [minimum]

Minimum refers to the value in a collection of values that is the least or smallest.

In mathematics, the minimum of a function is the smallest value that the function takes at a point either within a given neighborhood (local or relative minimum) or on the function domain in its entirety (absolute minimum).

Examples

Python

>> import numpy as np
>> np.min([0, 1, 2])
0

See also

1056 questions
-1
votes
1 answer

Finding Minimum 3 Distinct Items From Array of Objects Using LINQ in C#

I have a class Customer that holds an array of class Order. class Customer { public string firstname { get; set; } public string lastname { get; set; } public Order[] orders {get; set;} } This is my order…
jasmine
  • 361
  • 1
  • 3
  • 11
-1
votes
1 answer

Prolog printing false when it should be returning a value

So basically I'm trying to find the second minimal value in a list, and the problem is that mino and secondMin return false, instead of numbers. When I do minlist(List, Min) manually, it returns Min = number, but I can't get sec to take on that…
-1
votes
2 answers

Java: Trouble calculating the minimum value scanned from a text file

The program I am working on takes numbers from a plain text file, and does calculations based on the numbers. One of the calculations needed is the overall minimum value. The issue lies in the fact that my current minimum score variable is set to…
-1
votes
1 answer

undirected graph what is the possible minimum spanning tree?

I try to solve this question but I am not sure of my solution the quetion This is my solution: I use Kruskal algorithm and I choose the edges that will make (a) leaf solution thank you.
Manal
  • 43
  • 4
-1
votes
1 answer

Minimum vh value (CSS)?

I'm new to using vh/vw values in css, but it's come in handy on my current project, where I want the main content container to fill the whole viewport height. This works fantastically until the viewport is shrunk vertically to around 200/300px, when…
Paulos3000
  • 3,355
  • 10
  • 35
  • 68
-1
votes
3 answers

Random numbers in array, max, min, average

So I'm making a ghetto weather report by creating a random number generator anywhere from 60-100 and storing 25 of these in an array. Then I have a function that calculates max, min, and average along with printing all of this out. I got it to…
Jclee
  • 39
  • 9
-1
votes
1 answer

C++ Program to find Minimum and Maximum value using One Variable

Hello Programmers Please Have a Look at this Code and tell me where is problem why i am not able to get Min Index i have to do this with out array where is logical mistake please someone trace. Thanks Advance #include using namespace…
Hassan Gillani
  • 33
  • 2
  • 12
-1
votes
3 answers

How would i find the position of this array index and also the minimum?

How would I complete this program by adding the minimum value of the array, and where the minimum value is located? public static void main(String[] args) { Scanner input; /* A file for the program to open, the absolute location is based on…
-1
votes
3 answers

minimum value in int array C++

I need to find the minimum value in int array, but the answer it gives me is really odd and from that I cannot even judge where the error is, I would really appreciate help. Here is the code I have written: #include #include…
Royal
  • 41
  • 8
-1
votes
2 answers

Getting minimum of top n rows

I wish to get min(somecolumn) from table from first n rows in MySQL. What is the best query to get the result? So far I found select min(a.column) from (select column from table limit 2000) a select min(a.column) from table a INNER JOIN (select…
codey
  • 11
-1
votes
1 answer

Finding minimum difference between a pair of integers

Given the set of unsorted integers, how to find every pair of integers which have minimum difference. There are 3 samples as described below: a = random.sample (range(-200,200), 5) b = random.sample (range(-1000, 1000), 25) c = random.sample…
jimo
  • 430
  • 2
  • 7
  • 19
-1
votes
2 answers

C pointers, minimum and maximum values

I need to write a function that gets num1, num2 and num3 as parameters. Once the function is done running, the parameters(num1, num2 and num3) sent to the main function should change so that num1 contains the smallest value, num2 contains the second…
Amnon Hanuhov
  • 21
  • 1
  • 3
  • 9
-1
votes
1 answer

How do I pull out the max and min of the given numbers or improve this in general?

I'm not the brightest when it comes to coding. In fact, I spent my whole last semester on Python and now I'm on Java. It's sort of a whole new world for me. I barely remember Python because we barely used it. Now I'm assigned something from a…
Cindy
  • 1
-1
votes
2 answers

Returning minimum key-value pair of nested python dictionaries with exclusions?

Let's say I have the following nested dictionary d: d = {'1':{'80':982, '170':2620, '2':522}, '2':{'42':1689, '127':9365}, '3':{'57':1239, '101':3381, '43':7313, '41':7212}, '4':{'162':3924} } and an array e: e = ['2', '25', '56'] I want to…
user3809888
  • 377
  • 1
  • 6
  • 23
-1
votes
2 answers

R: row number of the minimum value in each column

I've got a matrix and now I search for the minimum value of EACH column. I've got de next code: error.mars1[which(error.mars1==0)] = NA minValue = min(error.mars1[,2],na.rm=T) I've used NA because I want a nonzero minimum value. So this was to get…
Silke
  • 177
  • 1
  • 11