lspn报考的order book 的区别number

From Wikipedia, the free encyclopedia
In , a well-order relation (or well-ordering) on a
on S with the property that every
of S has a
in this ordering. The set S together with the well-order relation is then called a well-ordered set. The hyphen is frequently omitted in contemporary papers, yielding the spellings wellorder, wellordered, and wellordering.
Every non-empty well-ordered set has a least element. Every element s of a well-ordered set, except a possible , has a unique successor (next element), namely the least element of the subset of all elements greater than s. There may be elements besides the least element which have no predecessor (see
below for an example). In a well-ordered set S, every subset T which has an upper bound has a , namely the least element of the subset of all upper bounds of T in S.
If ≤ is a
well-ordering, then & is a strict well-ordering. A relation is a strict well-ordering if and only if it is a
. The distinction between strict and non-strict well-orders is often ignored since they are easily interconvertible.
Every well-ordered set is uniquely
to a unique , called the
of the well-ordered set. The , which is equivalent to the , states that every set can be well-ordered. If a set is well-ordered (or even if it merely admits a ), the proof technique of
can be used to prove that a given statement is true for all elements of the set.
The observation that the
are well-ordered by the usual less-than relation is commonly called the
(for natural numbers).
Main article:
Every well-ordered set is uniquely
to a unique , called the
of the well-ordered set. The position of each element within the ordered set is also given by an ordinal number. In the case of a finite set, the basic operation of , to find the ordinal number of a particular object, or to find the object with a particular ordinal number, corresponds to assigning ordinal numbers one by one to the objects. The size (number of elements, ) of a finite set is equal to the order type. Counting in the everyday sense typically starts from one, so it assigns to each object the size of the initial segment with that object as last element. Note that these numbers are one more than the formal ordinal numbers according to the isomorphic order, because these are equal to the number of earlier objects (which corresponds to counting from zero). Thus for finite n, the expression "n-th element" of a well-ordered set requires context to know whether this counts from zero or one. In a notation "β-th element" where β can also be an infinite ordinal, it will typically count from zero.
For an infinite set the order type determines the , but not conversely: well-ordered sets of a particular cardinality can have many different order types. For a countably infinite set, the set of possible order types is even uncountable.
The standard ordering ≤ of the
is a well-ordering and has the additional property that every nonzero natural number has a unique predecessor.
Another well-ordering of the natural numbers is given by defining that all even numbers are less than all odd numbers, and the usual ordering applies within the evens and the odds:
0 2 4 6 8 ... 1 3 5 7 9 ...
This is a well-ordered set of order type ω + ω. Every element has a successor (there is no largest element). Two elements lack a predecessor: 0 and 1.
Unlike the standard ordering ≤ of the , the standard ordering ≤ of the
is not a well-ordering, since, for example, the set of
integers does not contain a least element.
The following relation R is an example of well-ordering of the integers:
one of the following conditions holds:
x is positive, and y is negative
x and y are both positive, and x ≤ y
x and y are both negative, and |x| ≤ |y|
This relation R can be visualized as follows:
0 1 2 3 4 ... -1 -2 -3 ...
R is isomorphic to the
Another relation for well-ordering the integers is the following definition: x ≤z y
(|x| & |y| or (|x| = |y| and x ≤ y)). This well-order can be visualized as follows:
0 -1 1 -2 2 -3 3 -4 4 ...
This has the
The standard ordering ≤ of the positive
is not a well-ordering, since, for example, the
(0, 1) does not contain a least element. From the
axioms of set theory (including the ) one can show that there is a well-order of the reals. Also
proved that ZF + GCH (the ) imply the axiom of choice and hence a well-order of the reals. Nonetheless, it is possible to show that the ZFC+GCH axioms alone are not sufficient to prove the existence of a definable (by a formula) well-order of the reals. However it is consistent with ZFC that a definable well-ordering of the reals exists—for example, it is consistent with ZFC that , and it follows from ZFC+V=L that a particular formula well-orders the reals, or indeed any set.
An uncountable subset of the real numbers with the standard ordering ≤ cannot be a well-order: Suppose X is a subset of R well-ordered by ≤. For each x in X, let s(x) be the successor of x in ≤ ordering on X (unless x is the last element of X). Let A = { (x, s(x)) | x ∈ X } whose elements are nonempty and disjoint intervals. Each such interval contains at least one rational number, so there is an
from A to Q. There is an injection from X to A (except possibly for a last element of X which could be mapped to zero later). And it is well known that there is an injection from Q to the natural numbers (which could be chosen to avoid hitting zero). Thus there is an injection from X to the natural numbers which means that X is countable. On the other hand, a countably infinite subset of the reals may or may not be a well-order with the standard "≤".
The natural numbers are a well-order.
The set {1/n : n =1,2,3,...} has no least element and is therefore not a well-order.
Examples of well-orders:
The set of numbers { - 2-n | 0 ≤ n & ω } has order type ω.
The set of numbers { - 2-n - 2-m-n | 0 ≤ m,n & ω } has order type ω?. The previous set is the set of
within the set. Within the set of real numbers, either with the ordinary topology or the order topology, 0 is also a limit point of the set. It is also a limit point of the set of limit points.
The set of numbers { - 2-n | 0 ≤ n & ω } ∪ { 1 } has order type ω + 1. With the
of this set, 1 is a limit point of the set. With the ordinary topology (or equivalently, the order topology) of the real numbers it is not.
If a set is , then the following are equivalent to each other:
The set is well-ordered. That is, every nonempty subset has a least element.
works for the entire ordered set.
Every strictly decreasing sequence of elements of the set must terminate after only finitely many steps (assuming the ).
Every subordering is isomorphic to an initial segment.
Every well-ordered set can be made into a
by endowing it with the .
With respect to this topology there can be two kinds of elements:
- these are the minimum and the elements with a predecessor.
- this type does not occur in finite sets, and may or may not occu the infinite sets without limit point are the sets of order type ω, for example N.
For subsets we can distinguish:
Subsets with a maximum (that is, subsets which are
by themselves); this can be an isolated point or a limit po in the latter case it may or may not be also a limit point of the subset.
Subsets which are unbounded by themselves but boun they have no maximum, but a supremu if the subset is non-empty this supremum is a limit point of the subset and hence a if the subset is empty this supremum is the minimum of the whole set.
Subsets which are unbounded in the whole set.
A subset is
in the whole set if and only if it is unbounded in the whole set or it has a maximum which is also maximum of the whole set.
A well-ordered set as topological space is a
if and only if it has order type less than or equal to ω1 (), that is, if and only if the set is
or has the smallest
order type.
, generalization
: "Some Applications of the Notions of Forcing and Generic Sets", Fundamenta Mathematicae, 56 (5
(1999). Real Analysis: Modern Techniques and Their Applications. Pure and applied mathematics (2nd ed.). . pp. 4–6, 9.  .EXCEL从小到大排名公式按你写的作了rank=(number,rer:order,1),一般都可以的,_百度知道
EXCEL从小到大排名公式按你写的作了rank=(number,rer:order,1),一般都可以的,
或7或9,不知为何,排名中会缺一个数字,当要取数值的单元格里有公式时7
但排名出现了这种现象
提问者采纳
如重复两个6名时,会跳到8名缺少排名数字,是因为有重复名次
提问者评价
其他类似问题
rank的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁NumberFormat (Java Platform SE 7 )
JavaScript is disabled on your browser.
Class NumberFormat
java.text.NumberFormat
All Implemented Interfaces:
Direct Known Subclasses:
public abstract class NumberFormat
NumberFormat is the abstract base class for all number
formats. This class provides the interface for formatting and parsing
numbers. NumberFormat also provides methods for determining
which locales have number formats, and what their names are.
NumberFormat helps you to format and parse numbers for any locale.
Your code can be completely independent of the locale conventions for
decimal points, thousands-separators, or even the particular decimal
digits used, or whether the number format is even decimal.
To format a number for the current Locale, use one of the factory
class methods:
myString = NumberFormat.getInstance().format(myNumber);
If you are formatting multiple numbers, it is
more efficient to get the format and use it multiple times so that
the system doesn't have to fetch the information about the local
language and country conventions multiple times.
NumberFormat nf = NumberFormat.getInstance();
for (int i = 0; i < myNumber. ++i) {
output.println(nf.format(myNumber[i]) + "; ");
To format a number for a different Locale, specify it in the
call to getInstance.
NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH);
You can also use a NumberFormat to parse numbers:
myNumber = nf.parse(myString);
Use getInstance or getNumberInstance to get the
normal number format. Use getIntegerInstance to get an
integer number format. Use getCurrencyInstance to get the
currency number format. And use getPercentInstance to get a
format for displaying percentages. With this format, a fraction like
0.53 is displayed as 53%.
You can also control the display of numbers with such methods as
setMinimumFractionDigits.
If you want even more control over the format or parsing,
or want to give your users more control,
you can try casting the NumberFormat you get from the factory methods
to a DecimalFormat. This will work for the vast majority
just remember to put it in a try block in case you
encounter an unusual one.
NumberFormat and DecimalFormat are designed such that some controls
work for formatting and others work for parsing.
The following is
the detailed description for each these control methods,
setParseIntegerOnly : only affects parsing, e.g.
"3456.78" -> 3456 (and leaves the parse position just after index 6)
if false, "3456.78" -> 3456.78 (and leaves the parse position just after index 8)
This is independent of formatting.
If you want to not show a decimal point
where there might be no digits after the decimal point, use
setDecimalSeparatorAlwaysShown.
setDecimalSeparatorAlwaysShown : only affects formatting, and only where
there might be no digits after the decimal point, such as with a pattern
like "#,##0.##", e.g.,
3456.00 -> "3,456."
if false, 3456.00 -> "3456"
This is independent of parsing.
If you want parsing to stop at the decimal
point, use setParseIntegerOnly.
You can also use forms of the parse and format
methods with ParsePosition and FieldPosition to
allow you to:
progressively parse through pieces of a string
align the decimal point and other areas
For example, you can align numbers in two ways:
If you are using a monospaced font with spacing for alignment,
you can pass the FieldPosition in your format call, with
field = INTEGER_FIELD. On output,
getEndIndex will be set to the offset between the
last character of the integer and the decimal. Add
(desiredSpaceCount - getEndIndex) spaces at the front of the string.
If you are using proportional fonts,
instead of padding with spaces, measure the width
of the string in pixels from the start to getEndIndex.
Then move the pen by
(desiredPixelWidth - widthToAlignmentPoint) before drawing the text.
It also works where there is no decimal, but possibly additional
characters at the end, e.g., with parentheses in negative
numbers: "(12)" for -12.
Number formats are generally not synchronized.
It is recommended to create separate format instances for each thread.
If multiple threads access a format concurrently, it must be synchronized
externally.
See Also:,
Nested Class Summary
Nested Classes&
Modifier and Type
Class and Description
static class&
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from NumberFormat.formatToCharacterIterator and as
field identifiers in FieldPosition.
Field Summary
Modifier and Type
Field and Description
static int
Field constant used to construct a FieldPosition object.
static int
Field constant used to construct a FieldPosition object.
Constructor Summary
Constructors&
Constructor and Description
Sole constructor.
Method Summary
Modifier and Type
Method and Description
Overrides Cloneable
Overrides equals
(double&number)
Specialization of format.
(double&number,
&toAppendTo,
Specialization of format.
(long&number)
Specialization of format.
(long&number,
&toAppendTo,
Specialization of format.
&toAppendTo,
Formats a number and appends the resulting text to the given string
Returns an array of all locales for which the
get*Instance methods of this class can return
localized instances.
Gets the currency used by this number format when formatting
currency values.
Returns a currency format for the current default locale.
(&inLocale)
Returns a currency format for the specified locale.
Returns a general-purpose number format for the current default locale.
(&inLocale)
Returns a general-purpose number format for the specified locale.
Returns an integer number format for the current default locale.
(&inLocale)
Returns an integer number format for the specified locale.
Returns the maximum number of digits allowed in the fraction portion of a
Returns the maximum number of digits allowed in the integer portion of a
Returns the minimum number of digits allowed in the fraction portion of a
Returns the minimum number of digits allowed in the integer portion of a
Returns a general-purpose number format for the current default locale.
(&inLocale)
Returns a general-purpose number format for the specified locale.
Returns a percentage format for the current default locale.
(&inLocale)
Returns a percentage format for the specified locale.
used in this NumberFormat.
Overrides hashCode
Returns true if grouping is used in this format.
Returns true if this format will parse numbers as integers only.
Parses text from the beginning of the given string to produce a number.
&parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals), otherwise a Double.
Parses text from a string to produce a Number.
(&currency)
Sets the currency used by this number format when formatting
currency values.
(boolean&newValue)
Set whether or not grouping will be used in this format.
(int&newValue)
Sets the maximum number of digits allowed in the fraction portion of a
(int&newValue)
Sets the maximum number of digits allowed in the integer portion of a
(int&newValue)
Sets the minimum number of digits allowed in the fraction portion of a
(int&newValue)
Sets the minimum number of digits allowed in the integer portion of a
(boolean&value)
Sets whether or not numbers should be parsed as integers only.
(&roundingMode)
used in this NumberFormat.
Methods inherited from class&java.text.
Methods inherited from class&java.lang.
, , , , , , ,
Field Detail
INTEGER_FIELD
public static final&int INTEGER_FIELD
Field constant used to construct a FieldPosition object. Signifies that
the position of the integer part of a formatted number should be returned.
See Also:,
FRACTION_FIELD
public static final&int FRACTION_FIELD
Field constant used to construct a FieldPosition object. Signifies that
the position of the fraction part of a formatted number should be returned.
See Also:,
Constructor Detail
NumberFormat
protected&NumberFormat()
Sole constructor.
(For invocation by subclass constructors, typically
implicit.)
Method Detail
public&&format(&number,
&toAppendTo,
Formats a number and appends the resulting text to the given string
The number can be of any subclass of .
This implementation extracts the number's value using
for all integral type values that
can be converted to long without loss of information,
including BigInteger values with a
of less than 64,
for all other types. It
then calls
This may result in loss of magnitude information and precision for
BigInteger and BigDecimal values.
Specified by:
&in class&
Parameters:number - the number to formattoAppendTo - the StringBuffer to which the formatted
text is to be appendedpos - On input: an alignment field, if desired.
On output: the offsets of the alignment field.
Returns:the value passed in as toAppendTo
- if number is
null or not an instance of Number.
- if toAppendTo or
pos is null
- if rounding is needed with rounding
mode being set to RoundingMode.UNNECESSARYSee Also:
parseObject
public final&&parseObject(&source,
Parses text from a string to produce a Number.
The method attempts to parse text starting at the index given by
If parsing succeeds, then the index of pos is updated
to the index after the last character used (parsing does not necessarily
use all characters up to the end of the string), and the parsed
number is returned. The updated pos can be used to
indicate the starting point for the next call to this method.
If an error occurs, then the index of pos is not
changed, the error index of pos is set to the index of
the character where the error occurred, and null is returned.
method for more information
on number parsing.
Specified by:
&in class&
Parameters:source - A String, part of which should be parsed.pos - A ParsePosition object with index and error
index information as described above.
Returns:A Number parsed from the string. In case of
error, returns null.
- if pos is null.
public final&&format(double&number)
Specialization of format.
- if rounding is needed with rounding
mode being set to RoundingMode.UNNECESSARYSee Also:
public final&&format(long&number)
Specialization of format.
- if rounding is needed with rounding
mode being set to RoundingMode.UNNECESSARYSee Also:
public abstract&&format(double&number,
&toAppendTo,
Specialization of format.
- if rounding is needed with rounding
mode being set to RoundingMode.UNNECESSARYSee Also:
public abstract&&format(long&number,
&toAppendTo,
Specialization of format.
- if rounding is needed with rounding
mode being set to RoundingMode.UNNECESSARYSee Also:
public abstract&&parse(&source,
&parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals), otherwise a Double.
If IntegerOnly is set, will stop at a decimal
point ( e.g., for rational numbers "1 2/3", will stop
after the 1).
Does no if no object can be parsed, index is
unchanged!
See Also:,
public&&parse(&source)
Parses text from the beginning of the given string to produce a number.
The method may not use the entire text of the given string.
method for more information
on number parsing.
Parameters:source - A String whose beginning should be parsed.
Returns:A Number parsed from the string.
- if the beginning of the specified string
cannot be parsed.
isParseIntegerOnly
public&boolean&isParseIntegerOnly()
Returns true if this format will parse numbers as integers only.
For example in the English locale, with ParseIntegerOnly true, the
string "1234." would be parsed as the integer value 1234 and parsing
would stop at the "." character.
Of course, the exact format accepted
by the parse operation is locale dependant and determined by sub-classes
of NumberFormat.
setParseIntegerOnly
public&void&setParseIntegerOnly(boolean&value)
Sets whether or not numbers should be parsed as integers only.
getInstance
public static final&&getInstance()
Returns a general-purpose number format for the current default locale.
This is the same as calling
getInstance
public static&&getInstance(&inLocale)
Returns a general-purpose number format for the specified locale.
This is the same as calling
getNumberInstance
public static final&&getNumberInstance()
Returns a general-purpose number format for the current default locale.
getNumberInstance
public static&&getNumberInstance(&inLocale)
Returns a general-purpose number format for the specified locale.
getIntegerInstance
public static final&&getIntegerInstance()
Returns an integer number format for the current default locale. The
returned number format is configured to round floating point numbers
to the nearest integer using half-even rounding (see ) for formatting,
and to parse only the integer part of an input string (see ).
Returns:a number format for integer valuesSince:
getIntegerInstance
public static&&getIntegerInstance(&inLocale)
Returns an integer number format for the specified locale. The
returned number format is configured to round floating point numbers
to the nearest integer using half-even rounding (see ) for formatting,
and to parse only the integer part of an input string (see ).
Returns:a number format for integer valuesSince:
getCurrencyInstance
public static final&&getCurrencyInstance()
Returns a currency format for the current default locale.
getCurrencyInstance
public static&&getCurrencyInstance(&inLocale)
Returns a currency format for the specified locale.
getPercentInstance
public static final&&getPercentInstance()
Returns a percentage format for the current default locale.
getPercentInstance
public static&&getPercentInstance(&inLocale)
Returns a percentage format for the specified locale.
getAvailableLocales
public static&[]&getAvailableLocales()
Returns an array of all locales for which the
get*Instance methods of this class can return
localized instances.
The returned array represents the union of locales supported by the Java
runtime and by installed
implementations.
It must contain at least a Locale instance equal to
Returns:An array of locales for which localized
NumberFormat instances are available.
public&int&hashCode()
Overrides hashCode
Overrides:
&in class&
Returns:a hash code value for this object.See Also:,
public&boolean&equals(&obj)
Overrides equals
Overrides:
&in class&
Parameters:obj - the reference object with which to compare.
Returns:true if this object is the same as the obj
false otherwise.See Also:,
public&&clone()
Overrides Cloneable
Overrides:
&in class&
Returns:a clone of this instance.See Also:
isGroupingUsed
public&boolean&isGroupingUsed()
Returns true if grouping is used in this format. For example, in the
English locale, with grouping on, the number 1234567 might be formatted
as "1,234,567". The grouping separator as well as the size of each group
is locale dependant and is determined by sub-classes of NumberFormat.
setGroupingUsed
public&void&setGroupingUsed(boolean&newValue)
Set whether or not grouping will be used in this format.
getMaximumIntegerDigits
public&int&getMaximumIntegerDigits()
Returns the maximum number of digits allowed in the integer portion of a
setMaximumIntegerDigits
public&void&setMaximumIntegerDigits(int&newValue)
Sets the maximum number of digits allowed in the integer portion of a
number. maximumIntegerDigits must be >= minimumIntegerDigits.
new value for maximumIntegerDigits is less than the current value
of minimumIntegerDigits, then minimumIntegerDigits will also be set to
the new value.
Parameters:newValue - the maximum number of intege if
less than zero, then zero is used. The concrete subclass may enforce an
upper limit to this value appropriate to the numeric type being formatted.See Also:
getMinimumIntegerDigits
public&int&getMinimumIntegerDigits()
Returns the minimum number of digits allowed in the integer portion of a
setMinimumIntegerDigits
public&void&setMinimumIntegerDigits(int&newValue)
Sets the minimum number of digits allowed in the integer portion of a
number. minimumIntegerDigits must be <= maximumIntegerDigits.
new value for minimumIntegerDigits exceeds the current value
of maximumIntegerDigits, then maximumIntegerDigits will also be set to
the new value
Parameters:newValue - the minimum number of intege if
less than zero, then zero is used. The concrete subclass may enforce an
upper limit to this value appropriate to the numeric type being formatted.See Also:
getMaximumFractionDigits
public&int&getMaximumFractionDigits()
Returns the maximum number of digits allowed in the fraction portion of a
setMaximumFractionDigits
public&void&setMaximumFractionDigits(int&newValue)
Sets the maximum number of digits allowed in the fraction portion of a
number. maximumFractionDigits must be >= minimumFractionDigits.
new value for maximumFractionDigits is less than the current value
of minimumFractionDigits, then minimumFractionDigits will also be set to
the new value.
Parameters:newValue - the maximum number of fractio if
less than zero, then zero is used. The concrete subclass may enforce an
upper limit to this value appropriate to the numeric type being formatted.See Also:
getMinimumFractionDigits
public&int&getMinimumFractionDigits()
Returns the minimum number of digits allowed in the fraction portion of a
setMinimumFractionDigits
public&void&setMinimumFractionDigits(int&newValue)
Sets the minimum number of digits allowed in the fraction portion of a
number. minimumFractionDigits must be <= maximumFractionDigits.
new value for minimumFractionDigits exceeds the current value
of maximumFractionDigits, then maximumIntegerDigits will also be set to
the new value
Parameters:newValue - the minimum number of fractio if
less than zero, then zero is used. The concrete subclass may enforce an
upper limit to this value appropriate to the numeric type being formatted.See Also:
getCurrency
public&&getCurrency()
Gets the currency used by this number format when formatting
currency values. The initial value is derived in a locale dependent
way. The returned value may be null if no valid
currency could be determined and no currency has been set using
The default implementation throws
UnsupportedOperationException.
Returns:the currency used by this number format, or null
- if the number format class
doesn't implement currency formattingSince:
setCurrency
public&void&setCurrency(&currency)
Sets the currency used by this number format when formatting
currency values. This does not update the minimum or maximum
number of fraction digits used by the number format.
The default implementation throws
UnsupportedOperationException.
Parameters:currency - the new currency to be used by this number format
- if the number format class
doesn't implement currency formatting
- if currency is nullSince:
getRoundingMode
public&&getRoundingMode()
used in this NumberFormat.
The default implementation of this method in NumberFormat
always throws .
Subclasses which handle different rounding modes should override
this method.
Returns:The RoundingMode used for this NumberFormat.
- The default implementation
always throws this exceptionSince:
setRoundingMode
public&void&setRoundingMode(&roundingMode)
used in this NumberFormat.
The default implementation of this method in NumberFormat always
Subclasses which handle different rounding modes should override
this method.
Parameters:roundingMode - The RoundingMode to be used
- The default implementation
always throws this exception
- if roundingMode is nullSince:
For further API reference and developer documentation, see . That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
&#x00a9; , Oracle and/or its affiliates.
All rights reserved.
Scripting on this page tracks web page traffic, but does not change the content in any way.

我要回帖

更多关于 order的意思 的文章

 

随机推荐